Commit Graph
133 Commits
Author SHA1 Message Date
Behdad Esfahbod 55743b239f [test/shape] Skip uniscribe/directwrite shapers under Wine 2025-03-22 19:56:00 -06:00
Behdad Esfahbod e0aee5815a [test] Respect MESON_EXE_WRAPPER in more test runners
It's not working for me though. Meson doesn't seem to set WINEPATH
during testing.
2025-03-22 14:56:37 -06:00
Behdad Esfahbod 51a5618c54 [test] Update text-rendering-tests 2025-03-22 13:20:16 -06:00
Khaled Hosny 12e31ab7e8 [test] Allow running test suite under wine
Set exe_wrapper in the Windows cross files, which will cause unit tests
to be run with wine.

When we call the binary ourselves, e.g. in shape run-tests.py, we need
to check for MESON_EXE_WRAPPER env var (which meson sets automatically
if exe_wrapper is set) and use it.
2025-03-21 02:27:45 +02:00
Khaled Hosny 14c07dcfa7 [test] Make context-matching test pass with coretext font functions
Remove the CBDT/CBLC tables not needed for the test and a glyf/loca
tables with blank glyphs to make Core Text load the font.
2025-03-20 18:05:30 -06:00
Khaled Hosny 686503e2e0 [directwrite] Copy font variations when shaping 2025-03-20 01:59:56 +02:00
Behdad Esfahbod 0349359ce6 [tests] Fix one test 2025-03-18 14:59:26 -06:00
Behdad Esfahbod 696b4a26a8 [coretext] Blocklist one more shape test 2025-03-17 21:05:21 -06:00
Behdad Esfahbod ad9c473759 [test/shape] Make output less verbose 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 630bc9b45d [coretext] Disable variation-selectors test :-( 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 719dafdaad [test/shape] Allow comments in directives
Also adjust tests for directwrite font-funcs.
2025-03-17 21:05:21 -06:00
Behdad Esfahbod 27bb37c5d0 [test/shape] Fix reporting 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 9a0802dbe5 [test/shape] Comments 2025-03-17 21:05:21 -06:00
Behdad Esfahbod ee34711d64 [test/shape] Allow directives to instruct what backends to test 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 220a8b9496 [test/shape] Massage script some more 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 7c248cccb5 [test/shape] Var rename 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 3e137c8e8a [test/shape] Minor massage the runner 2025-03-17 21:05:21 -06:00
Behdad Esfahbod cf1772a492 [test/shape] Compare results without glyph names if needed
Enable fontations font-funcs, which mostly passes now.
2025-03-17 21:05:21 -06:00
Behdad Esfahbod a37fb2fbf7 [test/shape] Rename a couple of variables 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 24f9fd46ce [test/shape] Restart hb-shape --batch process if killed 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 5b3bf25bb8 [test/shape] Test all font-funcs backends if none specified
Disable fontations as it doesn't implement glyph names currently.
2025-03-17 21:05:21 -06:00
Behdad Esfahbod f16196a00e [test-shape] Assume ot shaper is default 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 0d5795c0a5 [test/shape] Report shaper, face-loader, font-funcs 2025-03-17 21:05:21 -06:00
Behdad Esfahbod aacc667e51 [test/shape/run-tests] Streamline testing other backends 2025-03-17 21:05:21 -06:00
Behdad Esfahbod d8a774c011 [test] Add test for new grapheme cluster level 2025-03-10 01:04:35 -06:00
Behdad Esfahbod 2a878b1b76 [font-funcs] Add two new API
+ hb_font_set_funcs_using()
+ hb_font_list_funcs()

Part of https://github.com/harfbuzz/harfbuzz/issues/5117
2025-03-08 11:50:53 -07: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 be287eab02 [trak] Don't shift glyphs
That's what CoreText does and fonts are designed for. Who are we to improve on...
2025-02-09 04:19:02 +00:00
Behdad Esfahbod 1150d4bf12 [trak] Remove support for disabling using pseudo-font-feature
Fixes https://github.com/harfbuzz/harfbuzz/issues/5052
2025-02-09 04:16:57 +00:00
Behdad Esfahbod 1bf0a5bc17 [trak] Streamline a bit
Also use float math.
2025-02-09 02:43:09 +00:00
Behdad Esfahbod b1677e76aa [trak] Handle "out-of-range" values better
If requested size < min-size, use the value for min-size.
If requested size > max-size, use the value for max-size.

This is the only way that makes sense. Extrapolating as we were
doing, is just wrong...

This also seems to match what CoreText does.

Adjacent to fixing https://github.com/harfbuzz/harfbuzz/issues/5054
2025-02-09 02:05:36 +00:00
Behdad Esfahbod f394206b7c [ot-shape] Only apply trak'ing if STAT table present 2025-02-06 19:56:33 +00:00
Behdad Esfahbod 9ef009f597 [test] Fix test
Broken by previous commit.
https://github.com/harfbuzz/harfbuzz/issues/5020#issuecomment-2613597379
2025-01-24 16:37:12 -07:00
David Corbett 57569baa65 Don’t insert U+25CC before super/subscript digits 2025-01-03 05:19:13 -07:00
David Corbett edb3b20895 Make hb_test_tools.py work in Python 3.13 2024-12-15 12:34:48 -07:00
David Corbett f887096ab1 [myanmar] Allow all tones (& visarga) in any order 2024-12-15 12:32:08 -07:00
Khaled Hosny 773fe85018 [layout] Blocklist the GDEF table of various Courier New versions
These files have incorrectly give several base glyphs GDEF mark glyph
class leading in zeroing there advance widths.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4936
2024-11-21 14:40:57 -07:00
Behdad Esfahbod 2dc6334133 [tests] Remove invalid tests from collections.tests
Previously we silently returned the empty face if face_index
was out of range. With util/ now using the new API
hb_font_face_create_from_file_or_fail(), that returns a nullptr
face now. So, adjust tests.
2024-10-15 14:58:13 -06:00
David Corbett b6196986d7 [USE] Update the data files
This uses the data files from
<https://github.com/microsoft/font-tools/tree/e00698c07a0444647db84a7f8bf03d1081bd53b3/USE>.
2024-10-03 19:54:54 -06:00
Behdad Esfahbod 867366ccf1 [test] Add GeezaPro tests for MacOS 15.0 2024-09-24 09:40:44 -06:00
Behdad Esfahbod 7aace3d3fc Ignore CGJ and Mongolian Variation Selectors during GPOS
Fixes https://github.com/harfbuzz/harfbuzz/issues/4869
2024-09-23 08:00:06 -06:00
Behdad Esfahbod 5e5cd10e10 Don't make variation-selectors default-ignorable if not-found set
https://github.com/harfbuzz/harfbuzz/pull/4863#issuecomment-2366908261
2024-09-23 06:30:59 -06:00
Behdad Esfahbod b94a39d7f3 Follow up to variation-selector-not-found glyph
Addresses https://github.com/harfbuzz/harfbuzz/pull/4529#discussion_r1769638033

I'm not sure if this is an improvement. By leaving the var-selector
as default-ignorable, ligatures can form around it, and the resulting
cluster won't make it clear *which* base+var-selector could not be
resolved... That doesn't quite help font fallback the way we want.
Putting up for review.
2024-09-23 06:30:59 -06:00
Behdad Esfahbod 287046f71a [buffer] Hook up not-found-variation-selector-glyph
Fixes https://github.com/harfbuzz/harfbuzz/issues/4398
2024-09-21 12:21:56 -06:00
David Corbett 554658e3ae [Unicode 16] Update the emoji table & cluster test 2024-09-14 11:08:37 -04:00
Behdad Esfahbod 98353ecefe [test] Run shape tests with C locale as well
https://github.com/harfbuzz/harfbuzz/pull/4857
2024-09-11 11:35:15 -07:00
Behdad Esfahbod 788b469ad5 [ChainContext] Fix fast-path deviation from slow path
See comments. The input skippy was hitting the U+200D and NOT
seeing it skippable, whereas the context skippy would had.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4813
2024-07-25 14:50:01 -06:00
Khaled Hosny a38f853e83 Drop unused Makefile.sources files 2024-06-27 16:33:16 +03:00
Khaled Hosny cf1fdf1632 Drop autotools build
Fixes https://github.com/harfbuzz/harfbuzz/issues/4720
2024-06-27 15:28:38 +03:00