Behdad Esfahbod
1b7994cb3a
[aat] Support feature ranges
...
The hard way...
A bit uglier than I liked it to be, but is proper at least.
Fixes https://github.com/harfbuzz/harfbuzz/issues/4020
2023-01-09 21:16:20 -07:00
Behdad Esfahbod
622a686952
Revert "Revert "Revert "[aat] Allow disable feature ranges"""
...
This reverts commit 5202053c2c
.
2023-01-09 21:16:20 -07:00
Garret Rieger
0f01a83622
[subset] add basic test for CFF2 subsetting.
...
FontTools does not yet support CFF2 subsetting so we can't add a comparison test. Instead add a golden file test.
2023-01-09 21:15:11 -07:00
Behdad Esfahbod
5202053c2c
Revert "Revert "[aat] Allow disable feature ranges""
...
This reverts commit 82b3e8af69
.
Another try.
Fixes https://github.com/harfbuzz/harfbuzz/issues/4020
2023-01-09 17:59:09 -07:00
Behdad Esfahbod
82b3e8af69
Revert "[aat] Allow disable feature ranges"
...
This reverts commit 24a4d397ba
.
This was broken.
2023-01-09 17:28:52 -07:00
Behdad Esfahbod
24a4d397ba
[aat] Allow disable feature ranges
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/4020
This is a hack.
To implement this properly we need to treat runs with different features
as independent runs for running the state machine, as the subtable flags
might be different. That would be a significant change to our internal
implementation.
2023-01-09 17:26:48 -07:00
Matthias Clasen
b20871322f
test-paint: Fix use of g_test_skip
2023-01-09 16:30:42 -05:00
Behdad Esfahbod
3ff713ab80
[coretext] Remove unused variable
2023-01-09 14:19:25 -07:00
Behdad Esfahbod
4148487556
[ft] Comment
2023-01-09 13:47:59 -07:00
Behdad Esfahbod
d2aa2397ba
Optimize non-slant extents code
2023-01-09 13:44:44 -07:00
Behdad Esfahbod
73dab7f784
[ft] Fix slanting code
2023-01-09 13:44:44 -07:00
Matthias Clasen
eb0f0279d2
test-paint: Avoid g_test_skip_printf
...
This is relatively recent api we don't need.
2023-01-09 15:33:34 -05:00
Matthias Clasen
e61c2be41c
test-paint: Skip tests if ft COLRv1 is missing
2023-01-09 15:25:29 -05:00
Matthias Clasen
1d662632d9
test-paint: More output for failures
2023-01-09 15:01:59 -05:00
Matthias Clasen
64e3f53fc2
Merge pull request #4015 from harfbuzz/more-paint-tests
...
Add more paint tests
2023-01-09 14:43:33 -05:00
Matthias Clasen
d0108d31a2
Add more paint tests
...
These tests compare the output of the ft and ot
implementations for all the glyphs in the test_glyphs
font.
2023-01-09 14:42:30 -05:00
Behdad Esfahbod
0275151490
[paint] Align deptch/edge count conditions across two backends
2023-01-09 12:27:09 -07:00
Matthias Clasen
5f976d86a7
test-paint: Use %.3g for results
...
This produces more readable output.
2023-01-09 14:24:32 -05:00
Matthias Clasen
ec78a486bf
Run paint tests at upem scale
...
This avoids problems with rouding.
2023-01-09 14:03:58 -05:00
Behdad Esfahbod
839f4b6494
[ft] Fix slanting clip box
2023-01-09 12:01:46 -07:00
Behdad Esfahbod
30adbc22d9
hb-font: Fix scale_glyph_extents() again
...
And better fix this time.
2023-01-09 11:54:44 -07:00
Behdad Esfahbod
6c1a4bed4a
Better rounding clip boxes
2023-01-09 11:37:39 -07:00
Matthias Clasen
a085efa699
test-paint: Fix font setup for ft
...
We must call hb_ft_font_set_funcs after
setting the font scale.
2023-01-09 13:11:16 -05:00
Matthias Clasen
26f713a7f5
paint-test: Use larger scales
...
A scale of 20 is noise, so use 1000.
2023-01-09 12:54:06 -05:00
Behdad Esfahbod
e886b6b8a6
[test-draw] Use a larger scale
...
A scale of 20 is in the noise category for us. Using a larger
scale makes the test pass.
2023-01-09 10:31:28 -07:00
Matthias Clasen
347910fd4c
Add a draw test
...
This test compares output between ft and ot
font funcs.
2023-01-09 10:31:28 -07:00
Behdad Esfahbod
f46dcf147b
[paint/COLR] Fix clip transform
...
Sigh. So complicated.
2023-01-08 14:35:42 -07:00
Matthias Clasen
42047070dd
test-paint: More helpful output
...
No need to print ASCII chars as hex.
2023-01-08 16:08:16 -05:00
Behdad Esfahbod
f283d4d366
[paint] Try to adjust both renderers to use same clip order
2023-01-08 12:42:34 -07:00
Behdad Esfahbod
3fd6c0d97a
[test-paint] Remove unused FT_Library
2023-01-08 12:30:26 -07:00
Behdad Esfahbod
28be4f8805
[test-paint] Actually run against hb-ft
2023-01-08 12:19:41 -07:00
Matthias Clasen
ed7d0234e1
test-paint: Limit the precision of clip boxes
...
Update expected test results.
2023-01-08 11:57:43 -07:00
Behdad Esfahbod
5d94eb61b8
[hb-cairo] Fix hb_cairo_glyphs_from_buffer() when utf8 missing
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/4016
2023-01-08 11:56:01 -07:00
Matthias Clasen
10390ec5c6
Update expected test results
2023-01-08 09:06:03 -05:00
Matthias Clasen
f3ce137420
test-paint: Be more flexible for expected results
...
When generating the expected output with GENERATE_DATA=1,
Glib's test framework puts out some comments at the top
of the file. Ignore them when comparing the expected
output. This makes it possible to directly use the output
of
GENERATE_DATA=1 ./test-paint -p TESTCASE
as expected result for TESTCASE.
2023-01-08 09:01:31 -05:00
Behdad Esfahbod
5bd6fc1ace
Comment
2023-01-07 16:32:50 -07:00
Behdad Esfahbod
432afa9dff
[paint] Fix paint_extents usage
...
It was broken all this time :(.
The two backends do this slightly differently...
2023-01-07 16:25:30 -07:00
Behdad Esfahbod
a63d329261
[paint-extents] Simplify transform_extents
2023-01-07 16:05:24 -07:00
Behdad Esfahbod
e062f98260
[paint-extents] Fix transform_extents
...
Ouch!
2023-01-07 16:02:21 -07:00
Behdad Esfahbod
70ca146033
[chafa] Re-enable truecolor mode
...
See 42bf8e3d49
https://github.com/harfbuzz/harfbuzz/pull/2959#issuecomment-827056111
2023-01-07 15:48:57 -07:00
Behdad Esfahbod
823a9b18d9
[cairo] Return COMPOSITE mode CLEAR for unknown values
...
As per the spec.
2023-01-07 14:50:30 -07:00
Matthias Clasen
d0aaea2319
Update test results for paint-test
...
These were affected by the PaintComposite optimization.
2023-01-07 16:30:56 -05:00
Behdad Esfahbod
65c3cde5da
[COLRv1] Fix scale variation
2023-01-07 14:29:18 -07:00
Behdad Esfahbod
004cdc10f8
[open-type] More tweaks to fixed types
...
Add set_int().
2023-01-07 14:27:15 -07:00
Behdad Esfahbod
c8486b6301
[open-type] Add to_int to fixed types
...
To make sure we don't accidentally forget to_float().
As we did recently in COLRv1 code.
2023-01-07 14:15:17 -07:00
Behdad Esfahbod
dfd9bf8a50
[COLRv1] Fix a couple of missing to_float() calls
...
Ouch!
2023-01-07 14:05:02 -07:00
Behdad Esfahbod
d045de78c1
[paint] Optimize PAINT_COMPOSITE
...
At the start of each paint call the current group is clear.
So we don't need to start a new group for the backdrop paint.
A paint composite really needs one group push, not two.
2023-01-07 13:56:43 -07:00
Behdad Esfahbod
5ea5aacda9
[ft-colr] Adjust for FreeType master color-stop change
...
Part of https://github.com/harfbuzz/harfbuzz/issues/4013
2023-01-07 13:25:11 -07:00
Qunxin Liu
1eb5445e75
[subset] Fix issue in hb_subset_input_override_name_table()
...
If a nameRecord with provided name_id/platform_id/encoding_id/lang_id
is not retained after subsetting, create it and insert it to
the name table. So we need to check against retained name_records
rather than name_record in the original name table.
2023-01-06 19:17:14 -07:00
Behdad Esfahbod
30d4a73473
[hb-subset] Adjust help for instancing
2023-01-06 16:00:53 -07:00