Commit graph

18185 commits

Author SHA1 Message Date
Khaled Hosny
b8b56c4a67 [directwrite] Add comment [ci skip] 2025-03-07 14:30:53 +02:00
Khaled Hosny
a356603061 [directwrite/test] Add test that actually works
Apparently DirectWrite does not allow disabling calt in Arabic, so test
liga in Latin and ss01 in Arabic.
2025-03-07 14:30:53 +02:00
Khaled Hosny
9abaf193d3 [directwrite] Fix applying features to directwrite shaper
The range_features was ending up with random data because
hb_ms_make_feature_ranges() keeps pointers to data allocated in
feature_records and range_records, but that data was getting freed
before range_features was used. Change the variable scope to avoid
freeing the data too early.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5113
2025-03-07 14:30:53 +02:00
Behdad Esfahbod
fe8a3972dd [fontations] Speed up glyph_extents if x_scale == y_scale 2025-03-06 23:52:08 -07:00
Behdad Esfahbod
abc468275b [fontations] Cache GlyphMetrics objects 2025-03-06 23:50:05 -07:00
Behdad Esfahbod
6506bd7e82
Merge pull request #4498 from harfbuzz/PaintColrLayers
[COLRv1] Optimize PaintColrLayers instead of PaintComposite
2025-03-06 20:00:54 -07:00
Matthias Clasen
9fbc2d23b5 [test-paint] Regenerate the test output
This commit updates the expected output of the paint tests
to what the current code produces.
2025-03-06 20:11:23 -05:00
Matthias Clasen
0ce90f60ab [test-paint] Make it easier to regenerate test output
This command will regenerate the expected output for all the
paint tests:

GENERATE_DATA=1 G_TEST_SRCDIR=./test/api ./build/test/api/test-paint
2025-03-06 20:10:13 -05:00
Behdad Esfahbod
bf55e33287 [ft-colr] Protect against out-of-bounds color indices 2025-03-06 17:38:50 -07:00
Behdad Esfahbod
8685653cc7 [ft-colr] Fix crash if palette index is out-of-range 2025-03-06 17:28:09 -07:00
Behdad Esfahbod
ad9fa13d23 [fontations] Render nothing if palette index out of range
Matches ot. Ft crashes currently.
2025-03-06 17:25:56 -07:00
Behdad Esfahbod
cd45a7f531 [fontations] Add a constructor 2025-03-06 16:11:01 -07:00
Behdad Esfahbod
44705c1acb [fontations] Fix clippy target
To build in the build dir
2025-03-06 15:34:27 -07:00
Simon Cozens
cda4b56bfe "where" not needed for trait impl 2025-03-06 15:29:21 -07:00
Simon Cozens
e8bed99b16 Banish static lifetimes 2025-03-06 15:29:21 -07:00
Behdad Esfahbod
1147c0e1ca [fontations] Clean up data passing 2025-03-06 14:57:06 -07:00
Behdad Esfahbod
ad0bcec378 [cairo] More printf removal 2025-03-06 14:51:06 -07:00
Behdad Esfahbod
0d70cfacb2 Revert accidental changes 2025-03-06 14:50:39 -07:00
Behdad Esfahbod
77a319daa6 [fontations] Fix color-line extend fetching
This fixes the last bug I know.
2025-03-06 14:48:51 -07:00
Garret Rieger
fc8334d96b Final cleanups. 2025-03-06 14:04:37 -07:00
Garret Rieger
a20138dcfc More cleanups 2025-03-06 14:04:37 -07:00
Garret Rieger
f379505d4d Add struct_at/struct_at_mut helpers for accessing c arrays. 2025-03-06 14:04:37 -07:00
Khaled Hosny
123a0d68a1 Use gnu_printf format annotation under MingW with GCC only
Fixes https://github.com/harfbuzz/harfbuzz/issues/5106
2025-03-06 22:21:35 +02:00
Khaled Hosny
462a54895b [ci] Use newer Ubuntu release for cross compilation
Cairo sets -D_FORTIFY_SOURCE when building with optimizations, but it
was broken in some MingW releases. Updating seems to fix it.
2025-03-06 22:08:13 +02:00
Khaled Hosny
3985939842 Reapply "[meson] Add buildtype=debugoptimize by default"
This reverts commit 958e2c5331.
2025-03-06 22:08:13 +02:00
Behdad Esfahbod
597a934368 [fontations] Add target fmt for rustfmt 2025-03-06 12:50:42 -07:00
Behdad Esfahbod
4a3329dafb [fontations] Fix clippy rule 2025-03-06 12:46:35 -07:00
Behdad Esfahbod
4b035ae611 Fix build 2025-03-06 12:44:49 -07:00
Behdad Esfahbod
34a919b980 [fontations] Clippy 2025-03-06 12:42:42 -07:00
Behdad Esfahbod
547027837e [fontations] Add clippy target 2025-03-06 12:40:50 -07:00
Behdad Esfahbod
d9b1101de6 [fontations] Mark the whole public function unsafe 2025-03-06 12:06:12 -07:00
Behdad Esfahbod
b5d2ec4f83 [fontations] clippy 2025-03-06 12:02:12 -07:00
Behdad Esfahbod
92af2e47fc [fontations] Do a bounds check 2025-03-06 11:33:22 -07:00
Khaled Hosny
3ce6b720ac [fontations] slice::from_raw_parts requires the pointer to be non-null 2025-03-06 04:23:24 +02:00
Khaled Hosny
aecc9110a3 [fontations/test] Add to test-draw 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
a6d295fa1e [fontations] Disable symbol check
Since all of rust crates become public symbols. Sigh.
2025-03-06 04:23:24 +02:00
Khaled Hosny
6b035cd7b7 [fontations] Make check-header-guards happy 2025-03-06 04:23:24 +02:00
Khaled Hosny
83e58980a6 [fontations/ci] Fix package name 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
91f4a67d5d [fontations] Fix translucent foreground colors 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
43e82682c5 [cairo] Fix infinite loop in sweep-gradient code
Tested with U+F1314 from var font from:
https://github.com/googlefonts/color-fonts/blob/main/glyph_descriptions.md
2025-03-06 04:23:24 +02:00
Khaled Hosny
2c11c9db52 [ci] Give fontations a try 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
dedc05c220 [paint] Fix typo in radial-gradients! 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
9b4eaff867 [fontations] Fix palette handling
What a pain...
2025-03-06 04:23:24 +02:00
Behdad Esfahbod
3a699c3764 [fontations] Fix anchor unreduction 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
b5ad6de8d6 [fontations] Unreduce LinearGradient anchors
Oh well...
2025-03-06 04:23:24 +02:00
Behdad Esfahbod
a2d9c29b08 [fontations] Comment 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
b5a04a9600 [fontations] Fix sweep gradients 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
e10e5c3764 [fontations] Implement sweep gradients
Untested. Also, radial gradients seem faulty.
2025-03-06 04:23:24 +02:00
Behdad Esfahbod
865d75ef30 [fontations] Implement radial gradients 2025-03-06 04:23:24 +02:00
Behdad Esfahbod
d72968efac [fontations] Refactor make_color_line 2025-03-06 04:23:24 +02:00