Behdad Esfahbod
b11c14227f
Match backtrack/lookahead per syllable ( #5635 )
...
* [match-backtrack] Fix syllable-setting logic
If accidentally backtrack_len() was equal idx, we were setting
syllable, even though we want to match backtrack, which shouldn't
match syllable.
I'm surprised how this was not exposed before.
Fixes https://github.com/harfbuzz/harfbuzz/issues/5597
* Always match backtrack per syllable
* Always match lookahead per syllable as well
* Add Indic test for per-syllable backtrack/lookahead matching
2025-11-04 13:49:52 -07:00
Behdad Esfahbod
844f2fea06
[GPOS] Handle attach_chain() overflow ( #5636 )
...
Fixes https://oss-fuzz.com/testcase-detail/5461871294742528
2025-11-03 20:28:54 -07:00
Qunxin Liu
cb6e12bf3e
[repacker] remap 24 bits links cause they could be roots ( #5631 )
2025-11-01 16:39:29 -06:00
Behdad Esfahbod
54bcb3793a
[font] Don't apply slant to singular glyph origin functions either ( #5630 )
...
Followup to 6105bad187
2025-10-29 16:42:33 -06:00
Khaled Hosny
6105bad187
Fix applying synthetic slight to glyph origins ( #5629 )
...
* Fix applying synthetic slight to glyph origins
The hb_font_t::get_glyph_[h/v]_origins() methods were applying all the
transformations to the first glyph in the buffer. This shows up for
vertical text only because h_origin callback is usually unset.
Fixes https://github.com/harfbuzz/harfbuzz/issues/5628
* Don’t apply slant to glyph origin
Per discussion in https://github.com/harfbuzz/harfbuzz/issues/5628#issuecomment-3459345504
* Disable only font functions that fail
2025-10-29 13:59:51 -06:00
Behdad Esfahbod
41c8b99bee
Remove unused var
2025-10-22 18:47:07 -06:00
Khaled Hosny
46e3882f85
[subset] Don’t collect name IDs from STAT table if it is dropped ( #5623 )
2025-10-22 17:11:13 -06:00
Garret Rieger
07ee609f5a
Fix invalid pointer conversions in graph Coverage. ( #5622 )
...
For #5604 .
2025-10-20 20:06:43 -06:00
Behdad Esfahbod
73f98256c6
Revert "[match-backtrack] Fix syllable-setting logic ( #5617 )" ( #5620 )
...
This reverts commit 2c934a6b39 .
Revert until implications are sorted out:
https://github.com/harfbuzz/harfbuzz/issues/5618
2025-10-19 20:16:35 -06:00
Behdad Esfahbod
2c934a6b39
[match-backtrack] Fix syllable-setting logic ( #5617 )
...
If accidentally backtrack_len() was equal idx, we were setting
syllable, even though we want to match backtrack, which shouldn't
match syllable.
I'm surprised how this was not exposed before.
Fixes https://github.com/harfbuzz/harfbuzz/issues/5597
2025-10-18 22:31:31 -06:00
Behdad Esfahbod
b98ec96008
[cache] Fix get() check for item_t=int16_t
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5616
2025-10-18 15:00:45 -06:00
Behdad Esfahbod
f159600ccb
Fix a draw fuzzer uninitialized-memory issue ( #5615 )
...
Fixes https://oss-fuzz.com/testcase-detail/5714890590584832
2025-10-17 19:49:40 -06:00
Behdad Esfahbod
5973479e4b
[shape] Don't do font-funcs-based kerning for most shapers
2025-10-17 16:21:51 -06:00
Behdad Esfahbod
07f0cba388
[alloc-pool] Fix MSVC warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5613
2025-10-17 15:23:05 -06:00
Behdad Esfahbod
63e8c13e16
[hangul] Enable fallback position / kern table
...
https://github.com/harfbuzz/harfbuzz/pull/5609#issuecomment-3400878406
2025-10-15 12:41:50 -06:00
Behdad Esfahbod
3b58ce4518
[shape] Disable kern table in most shapers
...
Only default, Arabic, and Hebrew keep it.
Fixes https://github.com/harfbuzz/harfbuzz/issues/5607
Needs documentation update.
2025-10-13 13:26:23 -06:00
higher-performance
2ce548a7f3
Clean up std::forward to match spelling of argument type ( #5608 )
...
This helps readability and also avoids false positives during static analysis.
2025-10-13 13:11:15 -06:00
Harry Dalton
059fc205d9
Fix documentation of offsets in text glyph serialization format ( #5606 )
...
Offsets are serialized when only one of `x` and `y` is non-zero too:
https://github.com/harfbuzz/harfbuzz/blob/7c2105a52e6b50e448064e82c760dad0b5f4bdb9/src/hb-buffer-serialize.cc#L302-L303
2025-10-13 10:58:13 -06:00
Khaled Hosny
cb59b347ca
12.1.0
2025-10-01 08:24:34 +03:00
Behdad Esfahbod
4a26e289f7
Add hb_ot_layout_lookup_collect_glyph_alternates() ( #5367 )
...
* [map] Massage operator << overloads
* [ot-layout] Add +hb_ot_layout_lookup_collect_glyph_alternates
To collect all glyph mapping from SingleSubst or AlternateSubst
lookups in one call. Needed by FreeType autohinter for performance.
New API:
+hb_ot_layout_lookup_collect_glyph_alternates()
* [layout] Change hb_ot_layout_lookup_collect_glyph_alternates() API
https://github.com/harfbuzz/harfbuzz/pull/5367#discussion_r2149019638
2025-09-30 13:31:04 -06:00
Behdad Esfahbod
61b6a262cc
[pragmas] Disable -Wuninitialized and -Wmaybe-uninitialized on gcc
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5589
CC https://github.com/harfbuzz/harfbuzz/pull/5367
2025-09-30 13:18:46 -06:00
Behdad Esfahbod
af286b8f71
[Coverage] Simplify initialization
2025-09-30 13:00:36 -06:00
Behdad Esfahbod
164303139b
[pragmas] Demote -Wuninitialized from error to warning ( #5593 )
...
I suspect a gcc false positive.
"Fixes" https://github.com/harfbuzz/harfbuzz/issues/5589
2025-09-29 21:00:28 -06:00
Behdad Esfahbod
37fd8c0b15
[alloc-pool] Fix alignment ( #5592 )
...
We were aligning on the bytes remaining. Align on actual
pointer.
Probably fixes https://github.com/harfbuzz/harfbuzz/issues/5591
2025-09-29 21:00:21 -06:00
Khaled Hosny
720f1a3b66
12.0.0
2025-09-28 00:55:46 +03:00
Qunxin Liu
0952bc0ac2
[subset] de-duplicate features ( #5494 )
2025-09-26 12:10:28 -04:00
Behdad Esfahbod
6a2453bb20
Reapply "[VARC] Graduate out of experimental" ( #5588 )
...
This reverts commit 673934f2ce .
2025-09-25 21:54:20 -04:00
Behdad Esfahbod
9b043da781
[shape] Use a buffer scratch flag for fraction slash ( #5587 )
...
* [shape] Use a buffer scratch flag for fraction slash
* Remove unused non-ascii scratch flag
2025-09-24 14:39:38 -06:00
Behdad Esfahbod
88844e2ed9
[rust] Tweak debugoptimized again
...
Now on par in perf with release, but nice stacktraces.
2025-09-24 13:28:28 -06:00
Behdad Esfahbod
ba4f92f200
[rust] Change debugoptimized build to inherit dev instead of release
...
I was getting useless profiler stacks with the previous setup.
This one makes the debugoptimized build 30% slower than release
in one of my benchmarks, but at least we get useful stacktraces
by default.
2025-09-24 13:12:50 -06:00
Behdad Esfahbod
fc7617251a
[ValueFormat] comment
2025-09-24 12:42:53 -06:00
Behdad Esfahbod
9eb4318ea2
Fix fuzzer issue
2025-09-24 00:04:19 -06:00
Behdad Esfahbod
62ec647087
[shape] Use a buffer scratch flag for continuations ( #5586 )
...
Use it in form_clusters instead of ascii flag, for speedup.
2025-09-23 23:49:57 -06:00
Behdad Esfahbod
52eb959535
[rust] Don't use panic_immediate_abort ( #5585 )
...
It has changed. Use optimize_for_size which seems to have the
same size reduction effect.
Fixes https://github.com/harfbuzz/harfbuzz/issues/5584
2025-09-23 22:22:56 -06:00
Behdad Esfahbod
d350cb833a
Speed up ValueFormat len() calc
2025-09-23 20:34:13 -06:00
Behdad Esfahbod
88dfa2abd3
On gcc <= 12 don't use num fast path ( #5578 )
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5456
2025-09-23 20:34:02 -06:00
Behdad Esfahbod
3b1e9efb2b
[bit-page] Remove leftover bits from iterator
2025-09-23 19:09:46 -06:00
Behdad Esfahbod
7750fc2cf2
[buffer] Remove HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS ( #5583 )
...
It complicated correctness analysis. Remove it and always
propagate flags, which are much faster now anyway.
2025-09-23 18:56:53 -06:00
Behdad Esfahbod
2bcee1802f
[shape] Fix up propagate-flags after previous changes ( #5582 )
2025-09-23 18:44:44 -06:00
Behdad Esfahbod
c4ad58e3d5
[shape] Fix typo in propagate_flags
2025-09-23 18:32:42 -06:00
Behdad Esfahbod
73afc0033b
Propagate flags speedup ( #5581 )
...
* [shape] Micro-opt
* [shape] Speed up propagate_flags
2025-09-23 18:30:06 -06:00
Qunxin Liu
fdb80534e2
[subset-repacker] bug fix: copy markFilteringSet field if exists ( #5579 )
2025-09-23 15:32:41 -06:00
Behdad Esfahbod
98d14b4318
[chaincontext] Micro-optimize a conditional away
2025-09-23 13:32:15 -04:00
Behdad Esfahbod
e3a5152b0e
[buffer] Micro-opt next_glyphs()
2025-09-23 11:55:26 -04:00
Behdad Esfahbod
88b7a4f43f
[set-digest] Comments
2025-09-23 11:23:03 -04:00
Behdad Esfahbod
516c35cfd5
[buffer-message] Disable "more" messages by default ( #5577 )
...
This was not suppoosed to be turned on by default, as it has a
performance overhead. Instead, tools like Crowbar should define
HB_BUFFER_MESSAGE_MORE to 1 when building HarfBuzz.
2025-09-23 08:13:28 -06:00
Behdad Esfahbod
b2a6375b81
[ot-shape] Update update_digest() calls
...
Correction to ccfd1ae2d6
2025-09-22 17:31:11 -04:00
Behdad Esfahbod
3ce3853a96
Merge pull request #5575 from harfbuzz/apply-forward-speedup
...
[apply-forward] Speed up glyph skipping
2025-09-22 17:17:28 -04:00
Behdad Esfahbod
eeb16bd4d3
[apply-forward] Speed up glyph skipping
...
6% speedup in Roboto-Regular benchmark.
2025-09-22 16:59:28 -04:00
Behdad Esfahbod
ccfd1ae2d6
[buffer] Retain digest in the buffer
...
We don't have to reinitialize it for GPOS now, showing some
1.5% speedup on Roboto-Regular benchmark.
Over time we can change the various gsub_pauses to update the digest
in-place instead of returning true.
2025-09-22 16:49:29 -04:00