Commit graph

17891 commits

Author SHA1 Message Date
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
Behdad Esfahbod
c737829449 [OT] Remove likely() from coverage check
Not that it matters, but because of the set-digest, this path
is not very likely() anymore.
2025-02-06 01:42:25 +00:00
Behdad Esfahbod
3577992a5b [gsubgpos] Simplify a destruction 2025-02-06 01:30:59 +00:00
Behdad Esfahbod
d0d256bb66 [bit-page] Move a couple methods around 2025-02-06 01:26:33 +00:00
Behdad Esfahbod
a4cd11dea9 [bit-page] Micro-optimize 2025-02-06 01:13:58 +00:00
Behdad Esfahbod
0a678a9233 Fix leak 2025-02-06 01:02:44 +00:00
Behdad Esfahbod
cad264b2c9 Indent 2025-02-06 00:56:16 +00:00
Behdad Esfahbod
63c92d5a0d [set-digest] always-inline 2025-02-06 00:52:41 +00:00
Behdad Esfahbod
d712a02845 [set-digest] Back to a 3-entry, with different parameters now
We used to use 4,0,9 for years. Now 3,0,6. It is slightly faster
and shouldn't regress common fonts.  The rationale is that OT
GSUB/GPOS are split by script, so any particular script is not
likely to use more than a few thousands of (consecutive mostly)
glyphs. The exception is CJK of course, but those have less
GSUB/GPOS work.
2025-02-06 00:45:49 +00:00
Behdad Esfahbod
f5fe66cf5f [set-digest] Minor sanity 2025-02-06 00:36:58 +00:00
Behdad Esfahbod
4e75dfae84 Hide unused member 2025-02-06 00:14:29 +00:00
Behdad Esfahbod
99043f204d [gsubgpos] Tweak cache again 2025-02-05 20:11:27 +00:00
Behdad Esfahbod
69057e6ec0 [Ligature] Cache coverage the same way as PairPos1
Another 7% down on Roboto-Regular.
2025-02-05 19:50:51 +00:00
Behdad Esfahbod
3975e220ce Merge branch 'pairpos-cache' 2025-02-05 19:44:08 +00:00
Behdad Esfahbod
e535c6835b [Context] Simplify cache costing 2025-02-05 19:43:43 +00:00
Behdad Esfahbod
7a746c3295 [Coverage] Fix cache cost reporting 2025-02-05 19:38:25 +00:00
Behdad Esfahbod
9a15e0e69a
Merge pull request #5043 from harfbuzz/pairpos-cache
[OT] PairPos cache
2025-02-05 19:37:27 +00:00
Behdad Esfahbod
5be62a9f66 [PairPosFormat1] Use a coverage cache as well
Speeds up Arial shaping by 3%.
2025-02-05 19:30:01 +00:00
Behdad Esfahbod
f22943a2a2 [PairPos] Cache coverage as well
Another 3% down in Roboto-Regular.
2025-02-05 19:18:25 +00:00
Behdad Esfahbod
726af2e4e5 [PairPos] Use a class cache
10% speedup on Roboto-Regular. 5% on SF Pro.
2025-02-05 19:18:25 +00:00
Behdad Esfahbod
acd122d030 [gsubgpos] Prepare for per-lookup allocated caches 2025-02-05 19:18:25 +00:00
Behdad Esfahbod
3f40edbfa0 [ClassDef] Add ability to use a cache 2025-02-05 19:18:25 +00:00
Behdad Esfahbod
7392f32e47 [face] Tweak stack again
Let's go with one loop iteration. It's cheap.
2025-02-05 19:16:08 +00:00
Behdad Esfahbod
515b6a58d9 [face] Minor stack var size change 2025-02-05 19:13:19 +00:00
Behdad Esfahbod
601dd1a748 [face-builder] Fix an OOM issue
Fixes https://oss-fuzz.com/testcase-detail/5721476158521344
2025-02-05 19:10:41 +00:00
Behdad Esfahbod
c05002afb8 [set] Add may_have() as alias for get() 2025-02-05 16:46:13 +00:00
Behdad Esfahbod
ad7f428be4 [set-digest] Comment 2025-02-05 16:44:04 +00:00
Behdad Esfahbod
900db7b1bd [bit-set] Add a couple of alias methods 2025-02-05 16:41:49 +00:00
Behdad Esfahbod
942a30b7df [aat] Remove now-unused code 2025-02-05 14:21:49 +00:00
Behdad Esfahbod
44281b2856 [aat] Back to simplified heuristic
Performs overall better.
2025-02-05 14:19:01 +00:00
Behdad Esfahbod
dc8da6129f
Merge pull request #5042 from harfbuzz/aat-regression
[aat] Fix performance regression
2025-02-05 14:12:55 +00:00
Behdad Esfahbod
b857b21a45 [morx] Try using buffer-glyph-set adaptive to number of chains 2025-02-05 13:50:09 +00:00
Behdad Esfahbod
491c8c4e10 Revert "[aat] Change threshold from 4 to 16"
This reverts commit 624d6edfe4.

Some other benchmarks see better results for 4. Let's leave at that.
2025-02-05 13:00:09 +00:00
Behdad Esfahbod
624d6edfe4 [aat] Change threshold from 4 to 16
Still worth it it seems.
2025-02-05 12:46:25 +00:00
Behdad Esfahbod
a26cf0f409 [aat] Fix regression in performance of shaping tiny strings 2025-02-05 12:41:40 +00:00
Behdad Esfahbod
cec5c57130 [aat] Refactor a method 2025-02-05 12:39:22 +00:00
Behdad Esfahbod
cd5dfc6dbe [kerx] Use hb_bit_set_t instead of hb_set_t 2025-02-05 12:33:00 +00:00