Commit graph

17927 commits

Author SHA1 Message Date
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
1e3f59a79f [ci] Give sanitizers more time 2025-02-09 15:21: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
b5e07e7546
Merge pull request #5060 from harfbuzz/glyf-contour-start-match-ft-ct
[glyf] Change drawing algorithm to match FreeType / CoreText
2025-02-09 14:04:20 +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
4b54ee1148 [glyf] Change drawing algorithm to match FreeType / CoreText 2025-02-09 13:07:57 +00:00
Behdad Esfahbod
f858def14b Revert "[test] Exclude google-benchmark tests by default if meson "recent""
This reverts commit 3c975a857f.

See https://github.com/harfbuzz/harfbuzz/issues/4153#issuecomment-2646149763
2025-02-09 13:07:20 +00:00
Behdad Esfahbod
f68193a00a [glyf] Use direct access to points array
Not necessary faster. Prep'ing for next change.
2025-02-09 12:38:38 +00:00
Behdad Esfahbod
19a152b47e [perf] Don't depend on libharfbuzz-subset for most benchmarks 2025-02-09 12:37:28 +00:00
Behdad Esfahbod
3c975a857f [test] Exclude google-benchmark tests by default if meson "recent"
https://github.com/harfbuzz/harfbuzz/issues/4153#issuecomment-2646131694
2025-02-09 08:58:55 +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
b13017e651 Use HB_ALWAYS_INLINE instead of bare __attribute__
The former works on MSVC too.
2025-02-09 08:00:18 +00:00
Behdad Esfahbod
ee19666c39 [hb-shape/view] Allow --unicodes and --text if at least one is empty
Useful for scripting.
2025-02-09 05:14:36 +00:00
Behdad Esfahbod
5cab741929
Merge pull request #5058 from harfbuzz/ot-font-trak
[ot-font/trak] Move trak application to ot-font instead of ot-shape
2025-02-09 04:56:12 +00:00
Behdad Esfahbod
922a56f43a [trak] Fix configs build 2025-02-09 04:50:17 +00:00
Behdad Esfahbod
17c11ec523 [ft/trak] Apply trak in ft-font-funcs as well
Part of https://github.com/harfbuzz/harfbuzz/issues/5049
2025-02-09 04:46:29 +00:00
Behdad Esfahbod
ffae5b040d [ot-font/trak] Move trak application to ot-font instead of ot-shape
This is what CoreText does.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5049
2025-02-09 04:39:32 +00:00
Behdad Esfahbod
f840480fde [trak] Remove leftover 2025-02-09 04:27:20 +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
4c06c3d606
Merge pull request #5057 from harfbuzz/coretext-font-nonbmp
[coretext-font] Support non-BMP characters
2025-02-09 04:01:59 +00:00
Behdad Esfahbod
fb22295311 [coretext-font] Support non-BMP in variation-selector callback
Fixes https://github.com/harfbuzz/harfbuzz/issues/5056
2025-02-09 03:57:47 +00:00
Behdad Esfahbod
f6bf9f697e [coretext-font] Do early-return in get_nominal_glyphs()
Related to https://github.com/harfbuzz/harfbuzz/issues/5056
2025-02-09 03:57:47 +00:00
Behdad Esfahbod
c5e6c885c1 [coretext-font] Support non-BMP chars in get_nominal_glyph(s)
Part of https://github.com/harfbuzz/harfbuzz/issues/5056
2025-02-09 03:57:47 +00:00
Behdad Esfahbod
b9675d6d40
Merge pull request #5055 from harfbuzz/trak-interpolate
[trak] Interpolate between tracks
2025-02-09 03:01:21 +00:00
Behdad Esfahbod
a70a30ddfd [trak] Interpolate between tracks
Fixes https://github.com/harfbuzz/harfbuzz/issues/5054

According to Ned, this is what CoreText does.

Should add tests some time...
2025-02-09 02:56:20 +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
691cc93976 [trak] Fix build without STAT 2025-02-06 20:08:16 +00:00
Behdad Esfahbod
b8327fe605 Fix compiler errors 2025-02-06 20:01:12 +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
6e0dd8110e [trak] Default ptem to 12
That's what CoreText does.
https://developer.apple.com/documentation/coretext/ctfontcreatewithgraphicsfont(_:_:_:_:)

Fixes https://github.com/harfbuzz/harfbuzz/issues/5048
2025-02-06 19:56:30 +00:00
Behdad Esfahbod
ef00ac8c84
Merge pull request #5051 from harfbuzz/trak-choose
[trak] Choose closest trak track to 0.0
2025-02-06 17:44:55 +00:00
Behdad Esfahbod
6a37a65276 [trak] Choose closest trak track to 0.0
Seems to be what CT does. Needs more testing to adjust better, but
for now it's better than before.
2025-02-06 17:41:36 +00:00
Behdad Esfahbod
8efd2d85c7 [coretext] Fix CGFont leak 2025-02-06 14:38:09 +00:00
Behdad Esfahbod
b5327faf99 Fix leak
From recent work.
2025-02-06 14:26:37 +00:00
Behdad Esfahbod
24fe2be9c1 [subset] Fix undefined-behavior 2025-02-06 11:55:23 +00:00
Behdad Esfahbod
97db7bb2a0 [set-digest] Cosmetic 2025-02-06 11:01:59 +00:00
Behdad Esfahbod
f0d6a36612 [face] Use a macro 2025-02-06 02:51:50 +00:00
Behdad Esfahbod
7bdc6c9a5a Whitespace 2025-02-06 02:47:13 +00:00
Behdad Esfahbod
6091abcc9b [buffer] Avoid a copy in collect_codepoints() 2025-02-06 02:40:24 +00:00
Behdad Esfahbod
e5e3bc4080 [buffer] Merge two functions into a template 2025-02-06 02:37:10 +00:00
Behdad Esfahbod
403f12f766 [buffer] A few always-inline's 2025-02-06 02:33:41 +00:00
Behdad Esfahbod
4818ba9ece [set-digest] Yet another tuning
Saves 5% on SF Pro while regressing 2% on Roboto.
2025-02-06 01:50:12 +00:00