reuk
1560f87111
LowLevelGraphicsContext: Replace glyph drawing functions with single drawGlyphs()
2024-04-18 14:16:01 +01:00
reuk
c2fce879c5
Font: Allow switching between legacy non-portable metrics, and new portable metrics
2024-04-18 14:16:00 +01:00
reuk
4f2c287f9b
Font: Deprecate old Font constructors
2024-04-18 14:16:00 +01:00
reuk
9c1c61a06e
Android: Attempt to load legacy emoji font if fallback selects incompatible font
2024-04-18 14:15:59 +01:00
reuk
6c4c78baac
Typeface: Fix advances for Apple Color Emoji
...
The glyph spacing for this font does not scale linearly with the font
size; at smaller font sizes, the spacing is relatively larger.
Typeface::getStringWidth, Typeface::getGlyphPositions, and the
equivalent Font member functions now take the font size and horizontal
scale into account when computing advances on Apple platforms.
2024-04-18 14:15:59 +01:00
reuk
4e90ef831b
Typeface: Add support for rendering COLRv0 glyphs and png-based glyphs
...
This is sufficient for initial support of the system emoji fonts on each
platform:
- Noto Color Emoji on Linux and Android, png-based
- Apple Color Emoji on macOS and iOS, png-based
- Segoe UI Emoji on Windows 10 and 11, COLRv0-based
- This font also provides COLRv1 support, at least on Windows 11,
but JUCE will ignore that and use the COLRv0 data instead
2024-04-18 14:15:59 +01:00
reuk
0da52a8e7b
FreeType: Enable non-scalable glyphs, required for png emoji support
2024-04-18 14:15:59 +01:00
reuk
72819437e7
RenderingHelpers: Move drawGlyph to a common location
2024-04-18 14:15:59 +01:00
reuk
722ff41d66
RenderingHelpers: Individually template ClipRegion types
2024-04-18 14:15:59 +01:00
reuk
830bccd05f
RenderingHelpers: Disable gamma correction, which breaks colour emoji rendering
2024-04-18 14:15:59 +01:00
reuk
c40da067cd
RenderingHelpers: Implement GlyphCache in terms of LruCache
2024-04-18 14:15:59 +01:00
reuk
bc654f8007
RenderingHelpers: Reduce templating of GlyphCache
2024-04-18 14:15:58 +01:00
reuk
f5017be881
RenderingHelpers: Reduce templating of CachedGlyphEdgeTable
2024-04-18 14:15:58 +01:00
reuk
a6a336acb8
Typeface: Add support for querying system fallbacks
2024-04-17 14:41:01 +01:00
reuk
ce4f5377dd
Typeface: Switch to using harfbuzz for computing simple advances on all platforms
2024-04-17 14:41:01 +01:00
reuk
0d2e34f34c
Typeface: Implement platform typefaces using Harfbuzz hb_font_t
2024-04-17 14:41:00 +01:00
reuk
bafd0d293b
Android: Bring font metrics in line with other platforms
...
This updates the behaviour of Typeface::getStringWidth,
Typeface::getGlyphPositions, and Typeface::getEdgeTableForGlyph to match
the documented behaviour of these functions. Previously, these functions
returned results normalised to a size of 1 point. The new (documented)
behaviour is to normalise to a JUCE height of 1.0 - that is, scaled so
that the sum of the ascent and descent is equal to 1.0.
2024-04-16 21:07:45 +01:00
reuk
1f9ba0682c
ComSmartPtr: Make ownership more explicit
...
COM objects now always start with a refcount of 1, as is convention.
2024-04-16 21:07:45 +01:00
Tom Poole
94d98a2b10
Update licensing information
2024-04-16 11:39:35 +01:00
Anthony Nicholls
525e9e9ded
macOS: Prevent an empty RectangleList from incorrectly filling a graphics context
2024-02-29 12:21:10 +00:00
reuk
047448fbce
Warnings: Add missing overrides
2024-01-30 11:37:30 +00:00
Tom Poole
6bf9bb9a2e
Add final specifiers in implementation files
2023-10-10 16:12:38 +01:00
Anthony Nicholls
158220ddfa
Formatting: Use nested namespace definitions
2023-10-09 14:49:18 +01:00
Tom Poole
4153d59e39
Formatting
2023-10-02 15:42:20 +01:00
Tom Poole
9b041f3d74
Add a base clang-tidy configuration
2023-09-18 11:24:19 +01:00
Tom Poole
82f1fd57a4
Fix some compiler warnings
2023-08-29 12:59:09 +01:00
reuk
a22e423fc6
CoreGraphics: Refactor for improved consistency
2023-08-09 16:48:01 +01:00
reuk
3894fdbe5f
CoreGraphics: Fix issue where AlertWindow borders were not rendered correctly
2023-05-31 15:15:25 +01:00
reuk
8ed3618e12
CoreGraphicsContext: Fix issue where clipping a gradient on a layer-backed view could cause rendering glitches
2023-05-04 18:42:41 +01:00
reuk
b56f386b6b
CoreGraphicsContext: Reduce repetition
2023-05-04 18:42:41 +01:00
reuk
e414f76cac
CoreGraphicsContext: Replace bool flag with std::optional
2023-05-04 18:42:41 +01:00
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible
2023-04-04 19:55:11 +01:00
Anthony Nicholls
05d5c94990
Native: Rename all native files for improved consistency
2023-04-04 19:54:29 +01:00
reuk
454bc7c63a
CoreGraphicsContext: Avoid hanging when drawing transformed tiled images
...
CGContextGetClipBoundingBox sometimes returns a 'null' rect. When it
does, the following logic will get stuck in the while loop drawing
individual tiles over and over again.
2023-02-03 15:16:13 +01:00
reuk
28f2157912
Convert ignoreUnused to [[maybe_unused]]
2022-12-01 11:41:50 +00:00
reuk
19175ff698
OpenGL: Ensure that macOS uses the same (sRGB) colour space everywhere
2022-09-27 15:18:21 +01:00
attila
c0f31aa12a
CoreGraphics: fillAll() fills a larger area to avoid alpha blended edges
...
Alternatively we could disable antialiasing before the fill operation
but this could cause neighbouring Components to overlap on the screen
even if their coordinates don't.
2022-09-12 15:39:05 +02:00
reuk
5a6c8b1d0a
Linux Fonts: Improve default selection mechanism
2022-09-01 15:44:26 +01:00
reuk
c920eb95fd
Fonts: Fix issue where default fonts were set to use non-existent styles
2022-08-23 13:43:03 +01:00
reuk
41ef5b7fd5
macOS: Remove macOS 10.14 preprocessor checks
...
The current minimum-supported Xcode (10.1) includes the macOS 10.14.1
SDK, so APIs from macOS 10.14 will always be available.
2022-08-04 22:51:17 +01:00
Tom Poole
2ec861d99e
Update licensing banners to JUCE 7
2022-05-16 17:55:48 +01:00
reuk
67e3326ecf
Fonts: Avoid segfaulting on Linux when there are no installed fonts
2022-05-03 11:44:03 +01:00
reuk
3c08f8beda
Linux Fonts: Replace font style if it does not exist for the requested font
2022-04-28 11:05:40 +01:00
reuk
19ddbe2368
Warnings: Fix missing-prototypes warnings
2022-04-22 14:18:48 +01:00
reuk
3bf635e004
Warnings: Always supply all field initialisers
...
This also fixes an issue where the requested font style could be
incorrectly overwritten.
2022-04-22 14:18:48 +01:00
reuk
6de457f932
Linux Fonts: Add extra default font path
2022-04-22 14:07:46 +01:00
reuk
f9c0c626fe
Linux: Avoid picking a bold/oblique version of Bitstream Vera Sans by default
2022-04-22 13:55:47 +01:00
Tom Poole
dea3fe60e4
Update copyright banners
2022-04-04 12:36:32 +01:00
reuk
db3a0a1ae8
CoreGraphics: Avoid allocating over-large buffers for clipped image data
2022-03-09 17:06:28 +00:00
reuk
5186ac71e2
iOS: Fix no-matching-function error
2022-03-03 12:27:04 +00:00