Commit Graph
14024 Commits
Author SHA1 Message Date
Behdad Esfahbod 95eefa38f6 [set] Add a brute-force intersects(other_set) 2025-02-04 22:30:42 +00:00
Behdad Esfahbod 80bbb0b2e9 [set-digest] Rename a method 2025-02-04 22:30:32 +00:00
Behdad Esfahbod 7d17ea4996 Merge pull request #5037 from harfbuzz/face-blob
[face] Add fallback implementation to hb_face_reference_blob
2025-02-04 18:43:33 +00:00
Khaled Hosny a315d43b04 [doc] Update hb_face_reference_blob() and hb_reference_table_func_t 2025-02-04 20:41:01 +02:00
Behdad Esfahbod 722ab54868 [kerx] Don't compute buffer digest
We don't use it in kerx
2025-02-04 17:59:39 +00:00
Behdad Esfahbod 449c7f2a0d [aat] Add some tracing 2025-02-04 17:56:22 +00:00
Behdad Esfahbod 3a1d7ee7e8 [aat] Remove the buffer-digest threshold
This can help us skip entire subchains, eg. when they are for
different scripts.

Speeds up LucidaGrande with ASCII text by 20%.
2025-02-04 17:33:42 +00:00
Behdad Esfahbod e1cb3b155a Revert "[aat] Remove set-digest"
This reverts commit 832f199607.
2025-02-04 17:29:23 +00:00
Behdad Esfahbod 359d163d25 Revert "[aat] Remove buffer-digest stuff"
This reverts commit 7642366593.
2025-02-04 17:12:30 +00:00
Behdad Esfahbod 7d23e642a2 Revert "[aat] Remove dead code"
This reverts commit bf36f5c3a4.
2025-02-04 17:12:30 +00:00
Behdad Esfahbod d109947672 Revert "[aat] Remove unused macro"
This reverts commit 2ddcccd26e.
2025-02-04 17:12:30 +00:00
Behdad Esfahbod 2ddcccd26e [aat] Remove unused macro 2025-02-04 17:05:45 +00:00
Behdad Esfahbod 1ff462354b [morx] Micro-optimize 2025-02-04 16:46:25 +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 9cf2ea3e8f Merge branch 'kern-set' 2025-02-04 13:34:31 +00:00
Behdad Esfahbod bf36f5c3a4 [aat] Remove dead code 2025-02-04 13:32:31 +00:00
Behdad Esfahbod 7642366593 [aat] Remove buffer-digest stuff
With both morx & kerx sped up now using cache / set, this is not
beneficial anymore. Remove it.
2025-02-04 13:19:43 +00:00
Behdad Esfahbod 9a4601b06b [kern/kerx] Use hb-set-t for left/right, to guard bsearch
Use a set of all left glyphs participating in kerning, and all
right glyphs participating in kerning, and use these two to weed
out non-kerning pairs before bsearching into the kerns.

Speeds up shaping of HelveticaNeue by ~10%.
2025-02-04 13:16:54 +00:00
Behdad Esfahbod 3e50a8dfec [buffer] Use UINT_MAX instead of wrong macro 2025-02-04 13:06:23 +00:00
Behdad Esfahbod ee4ca63b6d [aat] Micro-optimize 2025-02-03 13:23:08 +00:00
Behdad Esfahbod ed37725e00 [aat] Micro-optimize get_class 2025-02-03 12:59:58 +00:00
Behdad Esfahbod 91572945bb [aat] More delambda
Again, this was costly.
2025-02-03 11:28:50 +00:00
Behdad Esfahbod 556eb02977 [aat] Remove a lambda
This lambda was added to "simplify" the logic. But has a lot of overhead.
2025-02-03 11:28:50 +00:00
Behdad Esfahbod d9a25bc4ee [aat] Allocate caches together
No separate malloc.
2025-02-03 11:28:50 +00:00
Behdad Esfahbod 7b44a94a55 [aat] Shrink cache to 256 bytes per subtable 2025-02-03 11:28:50 +00:00
Behdad Esfahbod b89ab7d0fb [aat] Shrink the class cache to be 512 bytes instead of 1kb 2025-02-03 11:28:50 +00:00
Behdad Esfahbod 4fb0ac7728 [aat] Minor simplify 2025-02-03 11:28:50 +00:00
Behdad Esfahbod 832f199607 [aat] Remove set-digest
Now that we have a class cache, this was just speeding things down.
2025-02-03 11:28:50 +00:00
Behdad Esfahbod 0e13e78153 [aat] Add a class-cache to the machine
Speeds up Times.ttc benchmark by 20%.
2025-02-03 11:28:50 +00:00
Behdad Esfahbod 138448487e [aat] Typo 2025-02-02 11:56:01 +00:00
Behdad Esfahbod f5e50890d0 [open-type] Another tweak to cmp()
Again, unlikely that compiler cares.
2025-02-02 11:40:27 +00:00
Behdad Esfahbod c68df817a6 [open-type] Minor tweak to cmp()
Remove codepath that was never taken.
2025-02-02 11:39:01 +00:00
Behdad Esfahbod 66bb94fe46 [set-digest] Tune back to starting with 4
Make Amiri slightly slower again, but works better for AAT fonts
I tested.
2025-02-02 08:40:30 +00:00
Behdad Esfahbod 9fd855ed55 [set-digest] Tune a bit more
Saves another 2% on Amiri benchmark.
2025-02-02 07:57:50 +00:00
Behdad Esfahbod 880b92ed6e [set-digest] Fix build on Linux 2025-02-02 07:43:33 +00:00
Behdad Esfahbod 92f13bbdd7 [set-digest] Inline combiner
Instead of defining one digest and then combining three of them at
different shifts, inline the code The compiler can optimize it better.

3% speedup with Amiri benchmark.
2025-02-01 19:11:20 +00:00
Behdad Esfahbod c4c8eb4f8c [algs] Rename a macro
Clashes with Apple simd/simd.h
2025-02-01 15:58:47 +00:00
Behdad Esfahbod 9ba286de08 [ot-shape] Micro-optimize ::equal
For two integers, it's faster to compare them directly.
2025-02-01 14:25:13 +00:00
Behdad Esfahbod 6be66b0ef2 [ft/coretext] Fail setting font-funcs gracefully
Fixes https://github.com/harfbuzz/harfbuzz/issues/5020
2025-01-24 16:26:54 -07:00
Behdad Esfahbod 4df11621ce [VARC] Fix variable binding
Ouch.
2025-01-24 05:00:05 -07:00
Behdad Esfahbod 2fa9ccee61 [VARC] Simplify 2025-01-23 23:14:53 -07:00
Behdad Esfahbod 2d2418ebac [VARC] Avoid float div-by-zero 2025-01-23 23:14:45 -07:00
Behdad Esfahbod fe9398e9a9 [VARC] Chain transforms
Previous code was actually wrong even, for non-uniform x/y font scale.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5017
2025-01-23 22:59:12 -07:00
David Corbett 22fbc75688 [ot-tags] Update IANA and OT language registries 2025-01-22 11:03:02 -07:00
Khaled Hosny a888761a78 [hb-ft] Hopefully clarify hb_ft_font_create() life cycle even more
Add “only” to one more place.
2025-01-21 15:57:10 +02:00
Behdad Esfahbod 3a7ebc320d [config] Fix build with HB_LEAN
Fixes https://github.com/harfbuzz/harfbuzz/issues/4997
2025-01-13 14:53:31 -07:00
Khaled Hosny 1e629c3511 [morx] Blocklist dysfunctional morx table of AALMAGHRIBI.ttf font
Fixes #4108
2025-01-13 11:30:00 -07:00
Khaled Hosny 7b27c8edd4 10.2.0 2025-01-11 18:13:18 +02:00
Behdad Esfahbod 021b443886 Garay script is RTL
Fixes https://github.com/harfbuzz/harfbuzz/issues/4996
2025-01-10 13:57:16 -07:00
Khaled Hosny fc42cdd68d [docs] Reduce warnings 2025-01-08 22:17:03 +02:00