Commit Graph
2569 Commits
Author SHA1 Message Date
Behdad Esfahbod 38db1facf2 [paint] Change back return type of paint_glyph() to void
Add new "_or_fail" variants of draw_glyph and paint_glyph

New API:
+hb_font_draw_glyph_or_fail_func_t
+hb_font_paint_glyph_or_fail_func_t
+hb_font_funcs_set_draw_glyph_or_fail_func()
+hb_font_funcs_set_paint_glyph_or_fail_func()
+hb_font_draw_glyph_or_fail()
+hb_font_paint_glyph_or_fail()

Deprecated API:
-hb_font_draw_glyph_func_t
-hb_font_paint_glyph_func_t
-hb_font_funcs_set_draw_glyph_func()
-hb_font_funcs_set_paint_glyph_func()
2025-04-23 18:23:51 -06:00
Behdad Esfahbod e78310bfaa [paint] Change return type to bool, and return false for outline glyphs
It was impossible to get synthetic bold/slant correctly with the
previous API. This is a minor API break, but one I'm willing to take.
2025-04-23 01:02:15 -06:00
Behdad Esfahbod 9445778e18 [test-paint] Update expectations for recent slant changes 2025-04-22 21:33:15 -06:00
Behdad Esfahbod 8aa88aa416 [COLRv1:ot/ft] Use paint-bounded instead of paint-extents
Faster. Note that this also means that if there is no clip-box,
we don't compute the bounds and emit an initial clip anymore.
That was totally unnecessary and against the COLRv1 rendering
algorithm.

This makes painting of COLRv1 fonts without clipboxes *much*
faster, as previously we were computing bounds using all subglyph
outlines. Not anymore.

Before:
BM_Font/paint_glyph/Nupuram-Color.colrv1.ttf/ot                   1.78 ms

After:
BM_Font/paint_glyph/Nupuram-Color.colrv1.ttf/ot                  0.155 ms
2025-04-20 04:11:07 -06:00
Garret Rieger efcb7d3de1 [subset] close unicodes over bidi mirror variants during subsetting.
Fixes #5281. Does the closure by default, but I've introduced a new flag and option to disable this behaviour since some users may want to get the minimal set if they know they don't need the mirrored variants.
2025-04-11 18:13:28 -06:00
Behdad Esfahbod e31721b5cf [test/shape] Write cmdline as test description 2025-04-06 21:41:09 -06:00
Behdad Esfahbod a3d626b4b9 [test-object] Hopefully last ubsan fix
API change:
- hb_face_is_immutable() now takes `hb_face_t *` instead of previous
  `const hb_face_t *`.  This should not pose any problem for any
  clients in our belief.
2025-04-06 19:16:43 -06:00
Behdad Esfahbod b99382e292 [test-unicode] Try disabling one test under ubsan 2025-04-06 18:53:53 -06:00
Behdad Esfahbod ba4a92c53b [test-object] Fix ubsan issues 2025-04-06 18:48:39 -06:00
Behdad Esfahbod 8a1ba4d151 [test-object] See if this helps make ubsan happy 2025-04-06 18:12:22 -06:00
Behdad Esfahbod fb04a306fc [test/api] Fix a few ubsan issues 2025-04-06 18:08:50 -06:00
Behdad Esfahbod b43901151f [test-draw] Make ubsan happy 2025-04-06 17:28:03 -06:00
Behdad Esfahbod f09c4d6dd8 [test/subset] Fix a regular expression 2025-04-06 15:54:21 -06:00
Behdad Esfahbod 1f0559392d [test/subset] Massage more 2025-04-06 15:50:20 -06:00
Behdad Esfahbod d8f00171d7 [test/subset] black 2025-04-06 15:33:25 -06:00
Behdad Esfahbod cc065cf2e5 [test/subset] Better report passed tests 2025-04-06 15:33:08 -06:00
Behdad Esfahbod c60067c675 [test/subset] See if this fixes CI 2025-04-06 15:25:58 -06:00
Behdad Esfahbod 8456c33ac3 [test/shape] Respect @face-loaders directive 2025-04-06 14:33:44 -06:00
Behdad Esfahbod 1f1cbb64ee Merge pull request #5260 from harfbuzz/tap
Use TAP protocol for tests
2025-04-06 14:30:07 -06:00
Behdad Esfahbod aa6a37de61 [test/subset] Port to TAP 2025-04-06 14:18:18 -06:00
Behdad Esfahbod ba309a1826 [test/fuzzing] Port all to TAP 2025-04-06 13:54:47 -06:00
Behdad Esfahbod 58d7ab2d59 [meson] Remove unneeded dependencies 2025-04-06 13:42:13 -06:00
Behdad Esfahbod 03f4230188 [mac] Add tests for --face-loader
https://github.com/harfbuzz/harfbuzz/issues/5142
2025-04-06 13:32:28 -06:00
Behdad Esfahbod 5a46872853 Add test for https://github.com/harfbuzz/harfbuzz/issues/5232 2025-04-06 13:32:28 -06:00
Behdad Esfahbod 2b5ae9dec3 [meson] Use a glob.py instead of ls / dir 2025-04-06 12:52:31 -06:00
Behdad Esfahbod 155e1e633b [test/api] Use g_assert_true instead of g_assert
The latter terminates the program. The former marks the test
as failing.
2025-04-06 03:49:15 -06:00
Behdad Esfahbod 5efdb884a5 [run-tests] Fix remaining bot fails, fingers crossed 2025-04-06 03:21:15 -06:00
Behdad Esfahbod 8132a6607f [shape/run-tests] Don't return non-zero
TAP protocol.
2025-04-06 03:12:38 -06:00
Behdad Esfahbod b2179dcfcd [meson.build] Another try 2025-04-06 03:03:41 -06:00
Behdad Esfahbod a777a9c535 [meson.build] Try fix using of find 2025-04-06 02:47:06 -06:00
Behdad Esfahbod e332777763 [fuzzing/subset] Make TAP protocol 2025-04-06 02:34:48 -06:00
Behdad Esfahbod 740a103ba1 [meson] See if this fixes bots 2025-04-06 02:34:48 -06:00
Behdad Esfahbod a530672f04 [meson.build] Don't use str.replace() method
Too recent.
2025-04-06 02:34:48 -06:00
Behdad Esfahbod fbda749bdb [meson.build] Try to bring down required version
range() not found
2025-04-06 02:34:48 -06:00
Behdad Esfahbod da5a9fb860 [meson.build] Remove unused fs module 2025-04-06 02:34:48 -06:00
Behdad Esfahbod b01cea95e1 [meson] Cosmetic 2025-04-06 02:34:48 -06:00
Behdad Esfahbod 1db93d2f6d [test/fuzzing/subset] Run chunks in parallel 2025-04-06 02:34:48 -06:00
Behdad Esfahbod ee50fad676 [run-tests] black 2025-04-06 02:34:48 -06:00
Behdad Esfahbod db953a43d0 [meson.build] Cosmetic 2025-04-06 02:34:48 -06:00
Behdad Esfahbod 69fd949014 [test/shape] Run using TAP protocol
Run all tests for a suite in one process. Saves runtime from
3s to 2s.
2025-04-06 02:34:48 -06:00
Behdad Esfahbod 2834900d92 [test/shape] Run each test suite in one process 2025-04-06 02:34:48 -06:00
Behdad Esfahbod e4e4d66523 [test/api] Test remaining tests to TAP 2025-04-06 02:34:48 -06:00
Behdad Esfahbod c523f9ac13 [test/shape] Use TAP
Checkpoint.
2025-04-06 02:34:48 -06:00
Behdad Esfahbod f69ecc9438 [test/api] Set protocol:tap 2025-04-06 02:34:48 -06:00
Behdad Esfahbod bee08cf290 [hb-test] Don't convert _ in test names to /
Slash is used for grouping...
2025-04-05 23:27:26 -06:00
Behdad Esfahbod 3cf48234b9 [hb-test.h] Remove unsed functions 2025-04-05 23:26:59 -06:00
Behdad Esfahbod 112b599826 [test] Minor use hb_test_init 2025-04-05 22:37:10 -06:00
Behdad Esfahbod 6c98519c7e [test/api] Simplify deps 2025-04-05 21:41:01 -06:00
Khaled Hosny a24c40dfb4 [test/ot-math] Do away with global variables 2025-04-06 03:22:20 +02:00
Khaled Hosny d74606bbff [test/ot-math] Port to use hb_test_open_font_file()
Avoids the unnecessary dependency on FreeType.
2025-04-06 03:22:20 +02:00