Khaled Hosny
c763763662
[buffer-serialize] Fix calculating absolute offsets with partial range
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5743
2026-02-15 17:30:16 +02:00
Garret Rieger
07e48ef1f0
Fix two bugs in hb_set_is_subset().
...
1. If smaller set has empty pages the subset checking logic was incorrectly incrementing the larger page index after skipping the empty smaller page index.
2. The logic for is_subset() on mixed inverted/not inverted sets was wrong.
2026-02-13 15:06:01 -07:00
Behdad Esfahbod
bb7dbc25ec
Fix some unused-var warnings under NDEBUG
2026-01-10 07:42:07 -07:00
David Corbett
bc2c60e490
[Unicode 17] Add tests
2025-09-10 12:15:49 -04:00
Qunxin Liu
77d073044e
[subset] fix HVAR encoding width ( #5523 )
2025-09-02 15:40:51 -06:00
Khaled Hosny
af1b9acc27
[glib] Drop fallback code for versions we don’t support
...
We require Glib 2.30.0, so drop checks for older versions.
2025-07-02 20:14:51 +03:00
Behdad Esfahbod
47089fe7a3
Big misc changes
...
- Make geometry types into templates taking float or double.
- Changes to paint() transform elimination.
- Add font->has_nonzero_coords and use it across.
- Extensions to avar processing for otherwise invalid mappings.
2025-06-08 13:43:27 +03:00
Behdad Esfahbod
7e353d3718
[test] Remove u8 prefix from strings
...
No idea how/why this got in there to begin with.
2025-05-23 14:31:58 -06:00
Behdad Esfahbod
fcedcf8111
[coretext] Another old-system build fix
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5300#issuecomment-2831684725
2025-04-25 19:04:37 -06:00
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
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
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
e4e4d66523
[test/api] Test remaining tests to TAP
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
Khaled Hosny
2d8e5255f3
[test/ot-math] Add a test for the Cambria Math workaround
2025-04-06 02:48:49 +02:00
Garret Rieger
a1e587b75a
[subset] Add hb_subset_cff_get_charstrings_index and hb_subset_cff2_get_charstrings_index.
...
These methods allow retrieving the entire charstrings index structure from a CFF or CFF2 table.
2025-03-31 16:28:28 -06:00
Garret Rieger
ae8b288db7
[subset] Correctly handle lifetime of charstrings data blob returned by hb_subset_cff_get_charstring_data.
2025-03-27 22:07:06 +00:00
Garret Rieger
0d4053b11d
[subset] Add hb-subset.h API for retrieving the raw per glyph outline data from CFF and CFF2.
2025-03-27 20:20:52 +00:00
Khaled Hosny
8d62ad3b35
[directwrite] Don’t release IDWriteFace pass to hb_directwrite_font_create
...
That was a leftover from previous code and is incorrect now as we would
be double releasing it.
2025-03-23 15:40:41 +02:00
Khaled Hosny
c226da8c35
[test/directwrite] Make the variations test actually test variations
2025-03-23 15:40:41 +02:00
Behdad Esfahbod
018858b2ce
Merge branch 'main' into ci-exe-wrapper
2025-03-22 20:24:44 -06:00
Behdad Esfahbod
3259f9f89a
[test-directwrite] Fix test
2025-03-22 20:14:01 -06:00
Behdad Esfahbod
9afdc7e1d2
[test-directwrite] Simplify
2025-03-22 19:48:15 -06:00
Khaled Hosny
1c7a1c7b04
[test-directwrite] Don’t fail if Bahnschrift can’t be loaded under Wine
...
It is unlikely to be present if one is not running on Windows.
2025-03-23 02:10:06 +02:00
Khaled Hosny
ed558e5da4
[test] Add name table to test/api/fonts/glyphs.ttf
...
Some version of Wine fails to load the font otherwise.
2025-03-23 01:28:41 +02:00
Behdad Esfahbod
f53befb6a0
[test/directwrite] Fix a leak
2025-03-22 16:54:56 -06:00
Behdad Esfahbod
c274ee7b3e
[directwrite] Add hb_font_t setter/getter from IDWriteFontFace
...
Changed API:
+hb_directwrite_font_create()
New API:
+hb_directwrite_font_get_dw_font_face()
2025-03-22 16:02:39 -06:00
Behdad Esfahbod
379688c566
[test-face] Relax on face load failure
2025-03-13 14:47:34 -06:00
Behdad Esfahbod
469502c99b
[test-paint] Test fontations too
...
Luckily it passes!
2025-03-12 11:02:43 -06:00
Behdad Esfahbod
d014efd03d
Merge pull request #5131 from harfbuzz/using2
...
Add hb_ft_face_create_from_blob_or_fail() et al
2025-03-11 13:37:48 -06:00
Behdad Esfahbod
759e1881e8
[coretext] Fix loading TTC files
2025-03-11 12:46:27 -06:00
Behdad Esfahbod
15fcfcb606
Merge pull request #5129 from harfbuzz/buffer-deserialize
...
Fix buffer deserialize
2025-03-11 12:01:20 -06:00
Behdad Esfahbod
5e6da54166
[test] Minor, accept absolute font paths
2025-03-11 12:00:18 -06:00
Behdad Esfahbod
8687f5c38e
[face] Add tests for new constructors
2025-03-11 11:56:00 -06:00
Behdad Esfahbod
756668d35c
[directwrite] Drop dependency again as per review
...
https://github.com/harfbuzz/harfbuzz/pull/5132#issuecomment-2714186460
2025-03-11 11:27:02 -06:00
Behdad Esfahbod
6b2f859232
[test-c] Disable gobject include
...
It can't find its dependent headers since not installed.
2025-03-11 00:37:11 -06:00