Commit Graph
2438 Commits
Author SHA1 Message Date
Behdad Esfahbod b2cdebeb64 [hb-draw-compare] Change tolerance from 1 to .5 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 76d4e5e0db [hb-draw-compare] Always create diff file 2025-03-02 16:59:23 -07:00
Behdad Esfahbod ee9d7e5392 [hb-draw-compare] Speed up by removing cmp
It was gatekeeping only 5 glyphs, but 2x slowing down comparison.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod dcd73915f9 [draw-compare] Add --face-index 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 65d453a032 [hb-draw-compare] Tweak 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 96c7f6a7a7 [hb-svg-compare] Report exact diff 2025-03-02 16:59:23 -07:00
Behdad Esfahbod f14eb54a23 [hb-draw-compare] Trying to speed up 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 9625933535 [hb-draw-compare] Remove svgo; add custom SVG comparator 2025-03-02 16:59:23 -07:00
Behdad Esfahbod a703e34ced [hb-draw-compare] Change default precision to 1
0 was producing faulty optinized shapes. Sigh..
2025-03-02 16:59:23 -07:00
Behdad Esfahbod 00cb38b9e5 [hb-draw-compare] Remove svgo config
Was producing faulty results :(.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod 9fc1ac18c0 [hb-draw-compare] Rewrite... 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 4008b79c31 [hb-draw-compare] Reuse existing SVGs 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 37b7ab6a5c [hb-draw-compare] Use find instead of ls 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 5672191426 [hb-draw-compare] Try making ls work 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 3d68517c38 [hb-draw-compare] Spoonfeed svgo 2025-03-02 16:59:23 -07:00
Behdad Esfahbod c86e0fcd3b [hb-draw-compare] "Improve" 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 835d9ce0f8 [hb-draw-compare] Use batching hb-view 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 2c8e862c0e [hb-draw-compare] Work on Unicodes, not glyphs 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 52534c6f4c [test] Add hb-draw-compare 2025-03-02 16:59:23 -07:00
Khaled Hosny 69e1c3c352 [ft] Add hb_ft_font_get_ft_face()
A new name for hb_ft_font_get_face(), which is now deprecated.

Fixes  https://github.com/harfbuzz/harfbuzz/issues/5084
2025-02-28 23:56:03 +02:00
Garret Rieger ea1434b897 Split iup glyf partial instance tests into a separate set which ignores due to IUP rounding differences fonttools. 2025-02-25 19:02:11 +00:00
Behdad Esfahbod 9a0cf8d641 [test/subset/cff-japanese] Shrink test
Was taking too long.
2025-02-25 00:19:25 -07:00
Behdad Esfahbod 084fb3ab4f [test/subset/cmap] Shrink test
Was taking more than the rest of the test suite combined.
2025-02-25 00:16:27 -07:00
Behdad Esfahbod 74bb7c52f3 Fix a compiler warning 2025-02-24 20:21:38 -07:00
Khaled Hosny 03cf1565f5 [directwrite] Rename font_get_font to font_get_dw_font
https://github.com/harfbuzz/harfbuzz/pull/5079#pullrequestreview-2627407692
2025-02-20 22:16:22 +02:00
Khaled Hosny a8fd29718a [directwrite] Add hb_directwrite_font_create()/font_get_font()
Uses hb_directwrite_face_create() under the hood, but copies variations
from directwrite to hb-font.
2025-02-20 21:40:27 +02:00
Khaled Hosny ff3aaece6d [test/shape-plan] Add another test and some comments 2025-02-14 21:54:30 +02:00
Khaled Hosny cf336f17b2 [shape-plan] Rename hb_ot_shape_plan_get_features to get_feature_tags
Simplify the API by returning only feature tags. The users of this API
would be interested only in feature enabled by default and whether the
feature is globally or partially enabled wouldn’t be of much interest in
that case. For user features, the user of the API already have full
access to them.
2025-02-14 21:54:30 +02:00
Khaled Hosny a7d7715f10 [shape-plan] Add hb_ot_shape_plan_get_features
This should get the features on a shape plan after executing it.

Initially I wanted to return an array of tags, but then there can be
user features that are not enabled globally, so I thought returning
hb_feature_t with value and range would be better. There is a TODO since
I couldn’t figure out how to get the value and range from the feature
mask. But also it may be overkill and a simple boolean indicating wither
it is a global feature or not would be enough.

I wounder also what should happen to non-user features that are applied
selectively, like init or medi, does ot make sense to indicate whether
they are global or not?

This is inspired by the discussion in:
https://github.com/fontforge/fontforge/pull/5522#pullrequestreview-2574321449,
but it might be useful to other HarfBuzz users.
2025-02-14 21:54:30 +02:00
Khaled Hosny 8c561733b6 [test/coretext] Add a test for copying variations 2025-02-12 14:21:09 +02:00
Khaled Hosny 7ba3efa5c6 [tests/fuzzing] Use the correct dirs for subset and repacker fuzzers 2025-02-09 18:42:45 +02:00
Khaled Hosny c404d8fc70 [test/fuzzing] Merge hb_fuzzer_tools.py back and simplify 2025-02-09 18:11:38 +02:00
Khaled Hosny 4c43fdcd07 [test/fuzzing] Simplify Python scripts further
We always path the fuzzer path in meson, so we don’t need to search for
fuzzer path in the scripts, and then we can use one script for all the
fuzzers.
2025-02-09 18:11:34 +02:00
Behdad Esfahbod c29b1de39f [test/fuzzing] Remove old cruft 2025-02-09 15:38:18 +00:00
Behdad Esfahbod 86329643fd [test/fuzzing] Call binaries with 64 fonts at a time
Second try... Previous attempt caused a too-many-command-line-args
on Windows.

https://github.com/harfbuzz/harfbuzz/issues/5061
2025-02-09 15:12:03 +00:00
Behdad Esfahbod be22e43d7d [test/fuzzing] Run each fuzzer on all fonts in one process
Much much faster, specially under valgrind, than spawning one process per font.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5061
2025-02-09 14:55:44 +00:00
Behdad Esfahbod 6738ee3d1b [ci/fedora-valgrind] Add time multiplier of 10 and run slow tests 2025-02-09 13:50:27 +00:00
Behdad Esfahbod fc4d507770 [hb-draw-fuzzer] Increase test time
I'm getting timeouts. Might be an infinite loop. But let's see.
2025-02-09 13:28:45 +00:00
Behdad Esfahbod cb6779f9e5 [test] Try running slow tests early
Probably already happens, but this wouldn't hurt.

https://github.com/harfbuzz/harfbuzz/issues/4153#issuecomment-2646125367
2025-02-09 08:39:03 +00:00
Behdad Esfahbod 134eef550d [test] Reorder test suites
Makes it a bit faster.

https://github.com/harfbuzz/harfbuzz/issues/4153#issuecomment-2646120679
2025-02-09 08:26:11 +00:00
Behdad Esfahbod c55738fa77 [test] Set MALLOC_CHECK_ to 1 instead of 2; kill G_SLICE=always-malloc
MALLOC_CHECK_=2 makes running tests twice slower on macOS. Value 1
is as fast as not checking at all. It's not like this ever caught
a bug for us or anything. We have so many sanitizers and fuzzers
funning on CI, which catch all kinds of memory problems.

G_SLICE is long gone in glib.

The slowest part of running the test suite now is the google-benchmark
tests, that get run by us... I'll see if I can disable. I had reported
it before at https://github.com/harfbuzz/harfbuzz/issues/4153
2025-02-09 08:11:01 +00: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 7f5fac7c87 [test-buffer] Fix unintionally merged change 2025-02-04 23:35:34 +00:00
Behdad Esfahbod f0ead85283 [aat] Implement set filtering for Noncontextual chains as well 2025-02-04 23:30:30 +00:00
Khaled Hosny 4825e5e2b4 [face] Add fallback implementation to hb_face_reference_blob
If referencing the face blob is not possible (e.g. not implemented by
the font functions), use face builder to create a blob out of
individual table blobs.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5036
2025-02-04 15:45:22 +02:00
Behdad Esfahbod b394ab39e9 [test-buffer] Add code for testing end_ptr 2025-02-01 14:26:32 +00:00