|
d5faabe7
|
2025-02-16T09:47:58
|
|
[decycler] Add test
|
|
0aa400b1
|
2025-02-15T23:19:44
|
|
[decycler] Implement an efficient graph cycle detector
This is an algorithm I came up with, based on the Floyd's
Tortoise-Hare constant-memory linear-time linked-list cycle-detection
algorithm.
https://en.wikipedia.org/wiki/Cycle_detection#Floyd's_tortoise_and_hare
It is linear-time and malloc-free. It *eventually* detects cycles,
not immediately.
The main different with Floyd's algorithm is that this algorithm
detects cycles when one is traversing down a graph, not just a
linked list.
Our existing cycle-detection algorithms use a set-of-integers,
either hb_set_t, or more efficient in this case, hb_map_t. Those
include at least one malloc, and as such show up on profiles.
Port hb-ot-font COLRv1 to use the decycler instead of previous
hb_map_t usage for cycle detection.
benchmark-font paint_glyph on NotoColorEmoji-Regular.ttf:
Before: 8ms; After: 5.5ms. No cycle detection: 5.5ms.
FT COLRv1 API is so slow (174ms) it's not worth porting to this.
Other graphs (VARC, etc) to be ported.
Test and documentation to be added.
|
|
ed76c855
|
2025-02-18T20:01:36
|
|
[COLR] Optimize palette access
|
|
016e78b6
|
2025-02-18T19:49:48
|
|
[COLR] Micro-optimize
|
|
215c8de3
|
2025-02-15T21:07:47
|
|
[ft-colr] Fix cycle-detection accounting
Fixes https://github.com/harfbuzz/harfbuzz/issues/5073
|
|
cf336f17
|
2025-02-10T14:15:25
|
|
[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.
|
|
a7d7715f
|
2025-02-02T23:06:11
|
|
[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.
|
|
bcd5aa36
|
2025-02-13T14:00:31
|
|
[docs/coretext] Fix hb_coretext_font_set_funcs() documentation
Remove the note that fonts created with hb_coretext_font_create() have
these font functions configured for them, which is not true.
hb_coretext_font_create() documents this correctly.
|
|
d2a88fbd
|
2025-02-12T21:48:22
|
|
[vector] Add alloc_exact()
|
|
c07b2233
|
2025-02-12T12:36:21
|
|
[coretext] Fix copying of variations when creating hb-font
|
|
778acfc6
|
2025-02-11T23:12:23
|
|
[coretext] Don't assume that a normalized-coord 0 mins design-coords at default
|
|
27a25f2d
|
2025-02-11T23:10:43
|
|
[coretext] Copy variations when creating hb-font
https://github.com/harfbuzz/harfbuzz/issues/3159#issuecomment-2652262262
|
|
94584d14
|
2025-02-12T13:33:57
|
|
[coretext] Use vector instead of malloc/free a C-array
|
|
1bc87dfe
|
2025-02-12T13:09:02
|
|
[coretext] Handle allocation failures
|
|
a69842a8
|
2025-02-12T11:23:28
|
|
[shape-plan] Minor check for invalid direction
|
|
e9c2d78d
|
2025-02-12T10:44:34
|
|
[buffer] Clean up some small mess
|
|
6d95c128
|
2025-02-12T10:36:49
|
|
[buffer] Remove unused includes
|
|
34464657
|
2025-02-06T12:03:18
|
|
[set] Tweak allocation
Allocation 2-page sets as exact count as well.
Don't do the same for the page_map.
|
|
4b54ee11
|
2025-02-09T12:38:58
|
|
[glyf] Change drawing algorithm to match FreeType / CoreText
|
|
f68193a0
|
2025-02-09T11:43:07
|
|
[glyf] Use direct access to points array
Not necessary faster. Prep'ing for next change.
|
|
b13017e6
|
2025-02-09T08:00:18
|
|
Use HB_ALWAYS_INLINE instead of bare __attribute__
The former works on MSVC too.
|
|
922a56f4
|
2025-02-09T04:50:17
|
|
[trak] Fix configs build
|
|
17c11ec5
|
2025-02-09T04:46:29
|
|
[ft/trak] Apply trak in ft-font-funcs as well
Part of https://github.com/harfbuzz/harfbuzz/issues/5049
|
|
ffae5b04
|
2025-02-09T04:39:32
|
|
[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
|
|
f840480f
|
2025-02-09T04:27:20
|
|
[trak] Remove leftover
|
|
be287eab
|
2025-02-09T04:18:31
|
|
[trak] Don't shift glyphs
That's what CoreText does and fonts are designed for. Who are we to improve on...
|
|
1150d4bf
|
2025-02-09T04:16:57
|
|
[trak] Remove support for disabling using pseudo-font-feature
Fixes https://github.com/harfbuzz/harfbuzz/issues/5052
|
|
fb222953
|
2025-02-09T03:56:46
|
|
[coretext-font] Support non-BMP in variation-selector callback
Fixes https://github.com/harfbuzz/harfbuzz/issues/5056
|
|
f6bf9f69
|
2025-02-09T03:52:13
|
|
[coretext-font] Do early-return in get_nominal_glyphs()
Related to https://github.com/harfbuzz/harfbuzz/issues/5056
|
|
c5e6c885
|
2025-02-09T03:49:01
|
|
[coretext-font] Support non-BMP chars in get_nominal_glyph(s)
Part of https://github.com/harfbuzz/harfbuzz/issues/5056
|
|
a70a30dd
|
2025-02-09T02:55:48
|
|
[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...
|
|
1bf0a5bc
|
2025-02-09T02:43:09
|
|
[trak] Streamline a bit
Also use float math.
|
|
b1677e76
|
2025-02-09T01:56:03
|
|
[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
|
|
691cc939
|
2025-02-06T20:08:16
|
|
[trak] Fix build without STAT
|
|
b8327fe6
|
2025-02-06T20:01:12
|
|
Fix compiler errors
|
|
f394206b
|
2025-02-06T19:48:56
|
|
[ot-shape] Only apply trak'ing if STAT table present
|
|
6e0dd811
|
2025-02-06T17:26:27
|
|
[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
|
|
6a37a652
|
2025-02-06T17:40:10
|
|
[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.
|
|
8efd2d85
|
2025-02-06T14:38:09
|
|
[coretext] Fix CGFont leak
|
|
b5327faf
|
2025-02-06T14:26:37
|
|
Fix leak
From recent work.
|
|
24fe2be9
|
2025-02-06T11:55:23
|
|
[subset] Fix undefined-behavior
|
|
97db7bb2
|
2025-02-06T11:01:59
|
|
[set-digest] Cosmetic
|
|
f0d6a366
|
2025-02-06T02:51:50
|
|
[face] Use a macro
|
|
7bdc6c9a
|
2025-02-06T02:47:13
|
|
Whitespace
|
|
6091abcc
|
2025-02-06T02:40:24
|
|
[buffer] Avoid a copy in collect_codepoints()
|
|
e5e3bc40
|
2025-02-06T02:36:26
|
|
[buffer] Merge two functions into a template
|
|
403f12f7
|
2025-02-06T02:33:41
|
|
[buffer] A few always-inline's
|
|
4818ba9e
|
2025-02-06T01:50:12
|
|
[set-digest] Yet another tuning
Saves 5% on SF Pro while regressing 2% on Roboto.
|
|
c7378294
|
2025-02-06T01:42:25
|
|
[OT] Remove likely() from coverage check
Not that it matters, but because of the set-digest, this path
is not very likely() anymore.
|
|
3577992a
|
2025-02-06T01:30:59
|
|
[gsubgpos] Simplify a destruction
|
|
d0d256bb
|
2025-02-06T01:26:33
|
|
[bit-page] Move a couple methods around
|
|
a4cd11de
|
2025-02-06T01:10:40
|
|
[bit-page] Micro-optimize
|
|
0a678a92
|
2025-02-06T01:02:44
|
|
Fix leak
|
|
cad264b2
|
2025-02-06T00:56:16
|
|
Indent
|
|
63c92d5a
|
2025-02-06T00:52:41
|
|
[set-digest] always-inline
|
|
d712a028
|
2025-02-06T00:43:10
|
|
[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.
|
|
f5fe66cf
|
2025-02-06T00:36:58
|
|
[set-digest] Minor sanity
|
|
4e75dfae
|
2025-02-05T23:57:37
|
|
Hide unused member
|
|
99043f20
|
2025-02-05T20:11:27
|
|
[gsubgpos] Tweak cache again
|
|
69057e6e
|
2025-02-05T19:50:38
|
|
[Ligature] Cache coverage the same way as PairPos1
Another 7% down on Roboto-Regular.
|
|
e535c683
|
2025-02-05T19:41:03
|
|
[Context] Simplify cache costing
|
|
7a746c32
|
2025-02-05T19:38:25
|
|
[Coverage] Fix cache cost reporting
|
|
5be62a9f
|
2025-02-05T19:30:01
|
|
[PairPosFormat1] Use a coverage cache as well
Speeds up Arial shaping by 3%.
|
|
f22943a2
|
2025-02-05T18:51:11
|
|
[PairPos] Cache coverage as well
Another 3% down in Roboto-Regular.
|
|
726af2e4
|
2025-02-05T18:10:40
|
|
[PairPos] Use a class cache
10% speedup on Roboto-Regular. 5% on SF Pro.
|
|
acd122d0
|
2025-02-05T17:38:39
|
|
[gsubgpos] Prepare for per-lookup allocated caches
|
|
3f40edbf
|
2025-02-05T17:25:27
|
|
[ClassDef] Add ability to use a cache
|
|
7392f32e
|
2025-02-05T19:16:08
|
|
[face] Tweak stack again
Let's go with one loop iteration. It's cheap.
|
|
515b6a58
|
2025-02-05T19:13:19
|
|
[face] Minor stack var size change
|
|
601dd1a7
|
2025-02-05T19:10:41
|
|
[face-builder] Fix an OOM issue
Fixes https://oss-fuzz.com/testcase-detail/5721476158521344
|
|
c05002af
|
2025-02-05T16:46:13
|
|
[set] Add may_have() as alias for get()
|
|
ad7f428b
|
2025-02-05T16:44:04
|
|
[set-digest] Comment
|
|
900db7b1
|
2025-02-05T16:41:49
|
|
[bit-set] Add a couple of alias methods
|
|
942a30b7
|
2025-02-05T14:21:49
|
|
[aat] Remove now-unused code
|
|
44281b28
|
2025-02-05T14:19:01
|
|
[aat] Back to simplified heuristic
Performs overall better.
|
|
b857b21a
|
2025-02-05T13:15:15
|
|
[morx] Try using buffer-glyph-set adaptive to number of chains
|
|
491c8c4e
|
2025-02-05T13:00:09
|
|
Revert "[aat] Change threshold from 4 to 16"
This reverts commit 624d6edfe4a4b854cf5e66c3fdeb6fc2e1916e14.
Some other benchmarks see better results for 4. Let's leave at that.
|
|
624d6edf
|
2025-02-05T12:45:57
|
|
[aat] Change threshold from 4 to 16
Still worth it it seems.
|
|
a26cf0f4
|
2025-02-05T12:41:40
|
|
[aat] Fix regression in performance of shaping tiny strings
|
|
cec5c571
|
2025-02-05T12:37:50
|
|
[aat] Refactor a method
|
|
cd5dfc6d
|
2025-02-05T12:32:02
|
|
[kerx] Use hb_bit_set_t instead of hb_set_t
|
|
d40c079f
|
2025-02-05T12:30:56
|
|
[morx] Use hb_bit_set_t instead of hb_set_t directly
|
|
7b927748
|
2025-02-05T12:25:54
|
|
[bit-set] Rename a method
|
|
fc825168
|
2025-02-05T11:17:18
|
|
[aat] Remove idempotent check
Not necessary after the recent filtering.
Another 10% speedup with LucidaGrande.
|
|
849b1735
|
2025-02-05T11:05:29
|
|
[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 37bfdf79c66ffbe4a5f02dbbc13756865ca11c1e
|
|
b4787838
|
2025-02-05T10:52:26
|
|
[aat] Speed up per-machine initial-glyph-set calculation
Use a bit-page instead of a full hb-set.
|
|
7d14eb5e
|
2025-02-05T10:46:28
|
|
[aat] Minor rename
|
|
6215d68b
|
2025-02-05T10:43:24
|
|
[aat] Minor tweak to logic
DELETED_GLYPH can also initiate action.
|
|
dc4ff701
|
2025-02-05T10:42:33
|
|
[bit-page] Add a couple of operators
|
|
37bfdf79
|
2025-02-05T02:08:19
|
|
[morx] Only collect glyphs that can initiate action in the machine
And match them against the buffer glyph_set.
4% speedup in LucidaGrande.
|
|
d9e99baa
|
2025-02-05T02:06:59
|
|
[aat] Move is_actionable outside of the driver_context
|
|
5ade5bab
|
2025-02-05T01:53:09
|
|
[aat] Move Flags out of driver_context_t
|
|
9f38690e
|
2025-02-05T01:39:28
|
|
[aat] Remove another unused parameter
One logic change, but should be fine.
|
|
d9058c64
|
2025-02-05T01:38:06
|
|
[aat] Remove an unused parameter
|
|
1a278073
|
2025-02-05T00:35:40
|
|
[array] Micro-optimize
|
|
c87bfe41
|
2025-02-05T00:22:27
|
|
[morx] Reuse a variable
|
|
e99e6538
|
2025-02-05T00:08:29
|
|
[aat-map] Micro-optimize a malloc
|
|
3e27038f
|
2025-02-04T23:39:42
|
|
[aat-map] Micro-optimize
|
|
f0ead852
|
2025-02-04T23:27:03
|
|
[aat] Implement set filtering for Noncontextual chains as well
|
|
e5bdba0b
|
2025-02-04T23:03:23
|
|
[aat] Rename a variable
|