1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-02 03:20:06 +00:00
Commit graph

525 commits

Author SHA1 Message Date
reuk
203e99c57d
D2D: Update Direct2DGraphicsContext::getPhysicalPixelScaleFactor to include context transform for consistency with other renderer backends 2024-04-29 16:08:23 +01:00
reuk
c2d86693ff
D2D: Avoid calling setPhysicalPixelScaleFactor 2024-04-29 16:08:23 +01:00
reuk
e005a41d6b
D2D: Remove unnecessary scaling in HwndPimpl::setSize 2024-04-29 16:08:23 +01:00
reuk
238edf6437
D2D: Remove unused function 2024-04-29 16:08:23 +01:00
reuk
49dec0a32a
D2D: Apply physical scale factor inside startFrame 2024-04-29 16:08:23 +01:00
reuk
122b75909e
D2D: Avoid setting DPI when resizing context, as it is already set per-frame 2024-04-29 16:08:23 +01:00
reuk
83ba2cba5d
D2D: Tidy up in typeface implementation 2024-04-29 16:08:22 +01:00
reuk
06903573d2
D2D: Refactor SwapChainThread and attempt to ensure correct alignment of slist entries 2024-04-29 16:08:22 +01:00
reuk
c5a9e26960
Typeface: Add support for querying the default system UI typeface 2024-04-29 16:08:21 +01:00
reuk
19061e6d17
Direct2D: Add initial support 2024-04-18 14:16:02 +01:00
reuk
7e87d3e7a6
RenderingHelpers: Fix transformed linear gradients
Previously, the software renderer could render transformed gradients
incorrectly. This could be seen in the backgrounds of the tabs in the
ComponentTransformsDemo when the view was rotated through around 45
degrees.

The new behaviour appears more consistent with the other renderers.
2024-04-18 14:16:02 +01:00
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