Commit graph

17839 commits

Author SHA1 Message Date
Behdad Esfahbod
b44f6ff5fe [perf/texts] Add a list of just 2letter strings 2025-02-05 12:19:48 +00:00
Behdad Esfahbod
f738534042
Merge pull request #5041 from harfbuzz/aat-machine-initial
[morx] Only collect glyphs that can initiate action in the machine
2025-02-05 12:19:30 +00:00
Behdad Esfahbod
fc825168d0 [aat] Remove idempotent check
Not necessary after the recent filtering.

Another 10% speedup with LucidaGrande.
2025-02-05 11:17:34 +00:00
Behdad Esfahbod
849b17351e [aat] Divide the logic of is_actionable() into two
The two different uses require different logic. I had combined
the two logic into one in 37bfdf79c6
2025-02-05 11:15:36 +00:00
Behdad Esfahbod
b4787838e4 [aat] Speed up per-machine initial-glyph-set calculation
Use a bit-page instead of a full hb-set.
2025-02-05 10:52:26 +00:00
Behdad Esfahbod
7d14eb5eb3 [aat] Minor rename 2025-02-05 10:46:28 +00:00
Behdad Esfahbod
6215d68b69 [aat] Minor tweak to logic
DELETED_GLYPH can also initiate action.
2025-02-05 10:43:24 +00:00
Behdad Esfahbod
dc4ff7012c [bit-page] Add a couple of operators 2025-02-05 10:42:33 +00:00
Behdad Esfahbod
37bfdf79c6 [morx] Only collect glyphs that can initiate action in the machine
And match them against the buffer glyph_set.

4% speedup in LucidaGrande.
2025-02-05 10:38:24 +00:00
Behdad Esfahbod
d9e99baa9a [aat] Move is_actionable outside of the driver_context 2025-02-05 02:06:59 +00:00
Behdad Esfahbod
5ade5bab01 [aat] Move Flags out of driver_context_t 2025-02-05 01:53:09 +00:00
Behdad Esfahbod
9f38690e8e [aat] Remove another unused parameter
One logic change, but should be fine.
2025-02-05 01:39:28 +00:00
Behdad Esfahbod
d9058c64e0 [aat] Remove an unused parameter 2025-02-05 01:38:06 +00:00
Behdad Esfahbod
1a2780735c [array] Micro-optimize 2025-02-05 00:35:40 +00:00
Behdad Esfahbod
c87bfe410b [morx] Reuse a variable 2025-02-05 00:22:27 +00:00
Behdad Esfahbod
e99e6538d9 [aat-map] Micro-optimize a malloc 2025-02-05 00:08:29 +00:00
Behdad Esfahbod
3e27038fca [aat-map] Micro-optimize 2025-02-04 23:39:42 +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
Behdad Esfahbod
e5bdba0b3c [aat] Rename a variable 2025-02-04 23:03:23 +00:00
Behdad Esfahbod
cb09fe7995 [bit-set] Remove a likely() 2025-02-04 22:54:10 +00:00
Behdad Esfahbod
749dc1eee0 [bit-set] Fix may_intersect() logic 2025-02-04 22:53:17 +00:00
Behdad Esfahbod
b30c65e271
Merge pull request #5040 from harfbuzz/aat-set
[aat] Speed up subchain skipping using exact sets
2025-02-04 22:48:58 +00:00
Behdad Esfahbod
22a21e81a0 [aat] Fix a crash 2025-02-04 22:30:42 +00:00
Behdad Esfahbod
275fb565bb [morx] Clean up memory 2025-02-04 22:30:42 +00:00
Behdad Esfahbod
255dadc152 [set] Speed up may_intersect() 2025-02-04 22:30:42 +00:00
Behdad Esfahbod
a617328005 [bit-set] Sprinkle a few .arrayZ around
All accesses are valid.
2025-02-04 22:30:42 +00:00
Behdad Esfahbod
7862c7c5e1 Rename a method again 2025-02-04 22:30:42 +00:00
Behdad Esfahbod
474bef1cfd [aat] Use exact set for buffer intersection versus subchains 2025-02-04 22:30:42 +00:00
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
5b49ac21fe
Merge pull request #5039 from harfbuzz/lucida
[aat] Speed up Lucida Grande among others
2025-02-04 18:40:27 +00: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
cafbdf4217
Merge pull request #5031 from harfbuzz/aat-speedup
[aat] Add a class-cache to the machine & fix speed regression from 2023!
2025-02-04 11:22:15 +00:00