Commit Graph

751 Commits

Author SHA1 Message Date
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
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
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 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
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
Matthias Clasen d0aaea2319 Update test results for paint-test
These were affected by the PaintComposite optimization.
2023-01-07 16:30:56 -05: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 c54debc76d [face] Add hb_face_collect_nominal_glyph_mapping
Fixes https://github.com/harfbuzz/harfbuzz/issues/3973
2023-01-05 11:57:48 -07:00
Matthias Clasen 9f3b59fe6b Update expected test results
These need updates, because they record
every callback, and we've changed what
callbacks are happening.
2022-12-31 16:19:20 -05:00
Matthias Clasen 313f74a693 Add a basic test for hb-coretext api
This tests what would be my minimum assumption
about this api. It was written blindly.
2022-12-28 11:14:22 -07:00
Matthias Clasen 661baf403c Add a basic test for hb-ft api
This tests what would be my minimum assumption
about this api.
2022-12-28 11:14:22 -07:00
Matthias Clasen 2a51567925 [paint] Add a test for recursion 2022-12-26 17:00:20 -07:00
Matthias Clasen 1eb4d002f2 Try to fix the build with msvc 2022-12-26 11:29:26 -07:00
Matthias Clasen 00e93102a6 Add a test for hb_ot_color_glyph_has_paint 2022-12-26 11:29:26 -07:00
Matthias Clasen e7b0947afd Add a test for hb_ot_color_has_paint 2022-12-26 11:29:26 -07:00
Matthias Clasen a7a93b85e6 Drop accidentally added ttx files 2022-12-24 12:08:32 -07:00
Behdad Esfahbod 6ccbfabd4f [paint] Return bool from paint_image()
Fixes https://github.com/harfbuzz/harfbuzz/issues/3974
2022-12-24 10:44:25 -07:00
Matthias Clasen d00e97f16c Add test-paint to the autotools build 2022-12-24 09:16:29 -05:00
Matthias Clasen 3478728edb Fix test-paint build without freetype 2022-12-24 09:16:29 -05:00
Matthias Clasen 9b9d7c7b8e Plug a memory lek in paint tests 2022-12-24 05:34:47 -05:00
Matthias Clasen f9c865a899 Update test results
These were changed by the introduction of
clip boxes.
2022-12-23 20:56:20 -05:00
Matthias Clasen 55b7af6b62 Tweak paint-tests 2022-12-23 18:34:09 -05:00
Matthias Clasen 44b48845b7 Add tests for hb_color_line_t
Test a few things that were broken with the
ft implementation before.
2022-12-23 16:28:53 -05:00
Behdad Esfahbod a4a86c0ec2 [test-paint] g_test_message 2022-12-23 13:52:22 -07:00
Behdad Esfahbod dcab567988 [test-paint] Don't use g_test_fail_print() for older glib 2022-12-23 13:47:37 -07:00
Matthias Clasen 8e197f50da Add missing paint test results 2022-12-23 13:40:02 -07:00
Matthias Clasen 3b021c5568 Run paint tests with ft font funcs 2022-12-23 13:37:59 -07:00
Matthias Clasen ca190aaba4 Split off the hb-paint tests
They belong in their own file.
2022-12-23 13:37:59 -07:00
Matthias Clasen ee7bbdf372 tests: Update expected results
These were changed by fixes for glyph transforms.
2022-12-23 13:37:59 -07:00
Matthias Clasen 3993a40703 test: Add some verification hints 2022-12-23 13:37:59 -07:00
Matthias Clasen 47dbebff39 [paint] Add COLRv0 tests 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 3c972867b9 More s/hb_font_get_glyph_shape/hb_font_draw_glyph/ 2022-12-23 13:37:59 -07:00
Matthias Clasen c221933977 [paint] Preserve foreground information 2022-12-23 13:37:59 -07:00
Matthias Clasen 6387004cad [paint] Simplify api
Drop the hb_paint_context_t struct from the API, and
only pass the font where we need it.
2022-12-23 13:37:59 -07:00
Matthias Clasen 71bd5a0dfc [paint] Resolve colors
We don't need to pass the index/alpha pairs to
client callbacks, and can just resolve the colors
internally.

Update test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen 9be01b6bff [paint] Pass hb_paint_context_t along
Replace the font argument with a hb_paint_context_t
that carries the font, the palette index and the
foreground color.

The hb_font_paint_glyph() api now takes the palette
index and the foreground color as extra arguments.

Update all callers and regenerate test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen 97224f3b63 [paint] Pass font to all callbacks
This will lead to easier implementations.

At the same time, we change the push_clip_glyph
callback to use the font as-is, no unscaling needed.

Update all callers and expected test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen b0fa40b2ec tests: More diagnostics 2022-12-23 13:37:59 -07:00
Matthias Clasen 290bb338bf Dist test result files 2022-12-23 13:37:59 -07:00
Matthias Clasen 74ccc1e76d tests: Produce useful output on failure 2022-12-23 13:37:59 -07:00
Matthias Clasen 084291108a Tests: Fix memleak pointed out by valgrind 2022-12-23 13:37:59 -07:00
Behdad Esfahbod d8cb7ceefb [test] Try fixing bots with old glib 2022-12-23 13:37:59 -07:00
Matthias Clasen 2d4678b647 Add a comment 2022-12-23 13:37:59 -07:00