Commit Graph
16728 Commits
Author SHA1 Message Date
Behdad Esfahbod 6df8ce7b41 [bit-page] Remove disabled assertion 2023-07-09 09:58:02 -06:00
Behdad Esfahbod 9b9a9c6f4a [bit-page] Speed up is_empty() 2023-07-09 09:55:00 -06:00
Behdad Esfahbod 2f4ed5e939 [bit-page] Short-circuit is_subset() 2023-07-09 09:45:46 -06:00
Behdad Esfahbod 347c1f7013 [set] Keep (lazy) population per bit-page
36% speedup in:
BM_subset/subset_glyphs/merged.devalast.ttf/10
2023-07-09 09:33:04 -06:00
Behdad Esfahbod 04ee306b9a [subset/hmtx] Another TODO 2023-07-09 07:37:57 -06:00
Behdad Esfahbod caef35b3ef [subset/hmtx] TODO 2023-07-09 07:23:16 -06:00
Behdad Esfahbod 982554c71c [subset/cff1] Speed up plan_subset_charset more
16% speed up in retaingid subsetting NotoSansCJKkr-Regular.otf.
2023-07-09 07:02:03 -06:00
Khaled Hosny 15d8f0ca7c [doc] Fix warning: Section has no title and no file
Move the private macros to the hb-common section, instead of a file-less
one.
2023-07-09 10:56:36 +03:00
Behdad Esfahbod e60ec9dcd3 [subset/cff2] Speedup retaingids serialize
10% speedup in subset_glyphs/SourceHanSans-VF.otf/retaingids/10
2023-07-08 20:48:18 -06:00
Behdad Esfahbod b583978bdf [subset/DeltaSetMapIndex] Speedup retaingids serialize() 2023-07-08 20:43:33 -06:00
Behdad Esfahbod 3505486a0d [subset/DeltaSetMapIndex] Micro-optimize 2023-07-08 20:28:45 -06:00
Behdad Esfahbod c8f6ae1df7 [subset/hvar/retaingids] Synthesize a DeltaSetIndexMap if needed
Before we were emitting the entire VarStore rows if advMap
was Null. Instead, synthesize an advMap.

20% speed up in subset_glyphs/SourceHanSans-VF.otf/retaingids benchmark.
2023-07-08 20:23:20 -06:00
Behdad Esfahbod 1f4645c6fc [subset/hvar] Speed up 2023-07-08 20:23:20 -06:00
Khaled Hosny 8d99db5c3b [wasm] Typo [ci skip] 2023-07-09 03:42:38 +03:00
Behdad Esfahbod 8115033ac3 [hvar] Speed up retaingids planning
35% speedup in:
BM_subset/subset_glyphs/SourceHanSans-VF.otf/retaingids/10
2023-07-08 18:33:42 -06:00
Behdad Esfahbod 1fe1a49790 [bimap] Minor vector pre-alloc 2023-07-08 18:33:42 -06:00
Behdad Esfahbod 7a7001dfcf Typo 2023-07-08 18:33:42 -06:00
Khaled Hosny b4305532a7 8.0.0 8.0.0 2023-07-09 03:20:27 +03:00
Khaled Hosny 5b8ba51251 [doc] Fix warning about missing hb-gobject section
We don’t build hb-gobject docs anymore, lets not bother gtk-doc with it.
2023-07-09 03:20:27 +03:00
Khaled Hosny 0ed946c379 [wasm] Fix warning
In file included from src/harfbuzz.cc:62:
src/hb-wasm-shape.cc:27:9: warning: 'HB_DEBUG_WASM' macro redefined [-Wmacro-redefined]
        ^
src/hb-debug.hh:393:9: note: previous definition is here
        ^
1 warning generated.
2023-07-09 03:20:27 +03:00
Khaled Hosny afe0910295 [font] Actually deprecate get_glyph_shape()
We previously marked it as deprecated in the documentation but didn’t
actually deprecate it in code. Now the only known users have migrated to
draw_glyph(), lets deprecate o=it for good.
2023-07-09 03:20:27 +03:00
Behdad Esfahbod c6a01441d9 [sanitize] Always-inline OffsetTo::sanitize()
8% speed up in sanitizing Gulzar.
2023-07-08 16:32:45 -06:00
Behdad Esfahbod f60dbd906a Fix thinko
Fixes https://oss-fuzz.com/testcase-detail/4787105656864768
2023-07-08 16:21:24 -06:00
Behdad Esfahbod d84c5f29b7 Revert "[gsubgpos] Make (Chain)Context funcs templatized"
This reverts commit 03ac08d267eb7ad2f1ac039115fc0030ea475fae.
2023-07-08 16:02:50 -06:00
Behdad Esfahbod e73223b9e5 [gsubgpos] Make (Chain)Context funcs templatized
Unfortunately they still won't be inlined because the matcher_t
needs function pointers. So, no speed up.  Going to revert.
2023-07-08 16:02:32 -06:00
Behdad Esfahbod 3e3820badd Simplify a few bool returns
Unnecessary. Cast to bool does the job.
2023-07-08 14:36:23 -06:00
Behdad Esfahbod 1c8d54deef [shape] Another always-inline 2023-07-08 14:28:07 -06:00
Behdad Esfahbod df45067fbb [shape] More always-inline 2023-07-08 14:22:59 -06:00
Behdad Esfahbod c3a28be509 [shape] One more always-inline 2023-07-08 14:20:45 -06:00
Behdad Esfahbod 7288123481 Allow overriding HB_ALWAYS_INLINE 2023-07-08 14:14:27 -06:00
Behdad Esfahbod 9fea19ebff [shape] Another always-inline 2023-07-08 13:56:24 -06:00
Behdad Esfahbod 5b45c56c9e [shape] Always-inline more
Another 10% speedup in BM_Shape Gulzar-Regular.
2023-07-08 13:53:36 -06:00
Behdad Esfahbod bb9692e8a3 [shape] Always-inline match_input
10% speedup in BM_Shape Gulzar-Regular.
2023-07-08 13:45:48 -06:00
Behdad Esfahbod 6c451054fb [sanitize] Sprinkle a few unlikely's 2023-07-08 12:55:34 -06:00
Behdad Esfahbod 4ecc62c28d [sanitize] Simplify ChainRule::sanitize again
check_struct does the same now.
2023-07-08 12:53:23 -06:00
Behdad Esfahbod 253ec08b3d [sanitize] Speed up check_struct on x64 2023-07-08 12:48:05 -06:00
Behdad Esfahbod fb02f4a897 [sanitize] Micro-optimize ChainRule::sanitize 2023-07-08 12:33:58 -06:00
Khaled Hosny c650858c63 [graphite] Fix cluster advance width
Based on https://github.com/harfbuzz/harfbuzz/issues/4309#issuecomment-1624730406

Fixes https://github.com/harfbuzz/harfbuzz/issues/4309
2023-07-08 13:51:07 -04:00
Behdad Esfahbod 73ee9c346f Revert "[sanitize] Only check trailing edge of ranges"
This reverts commit e4856cf809.

This is wrong on at least 32-bit systems. Might add a condition
version later.
2023-07-07 22:47:20 -06:00
Behdad Esfahbod 0b879afb5a [sanitize] Inline Coverage::sanitize 2023-07-07 22:35:43 -06:00
Behdad Esfahbod 92448910a7 [sanitize] Minor inline a few more short functions 2023-07-07 22:18:18 -06:00
Behdad Esfahbod d84504206c [sanitize] Optimize away an overflow check when not needed
When the length argument is 16bit...
2023-07-07 22:02:05 -06:00
Behdad Esfahbod e4856cf809 [sanitize] Only check trailing edge of ranges
Assumptions...

Speeds up Gulzar load_face_and_shape benchmark by 7%.
2023-07-07 23:57:45 -04:00
Behdad Esfahbod 6a683ea6eb [sanitize] Enlighten check_range() some more
No need to check for len=0 arrays. They must still be in range.
2023-07-07 21:02:15 -06:00
Behdad Esfahbod c24ea1036b [sanitize] Minor tweak to len=0 case which is handled otherwise anyway 2023-07-07 20:43:20 -06:00
Behdad Esfahbod 403bc7caa4 [sanitize] Simplify Rule::sanitize() 2023-07-07 20:17:32 -06:00
Behdad Esfahbod 385896ff66 [sanitize] Speed up ChainRule::sanitize()
10% speedup in sanitizing Gulzar-Regular.
2023-07-07 19:56:19 -06:00
Behdad Esfahbod 2006d3211f [sanitize] Add "fastpath" for ArrayOfOffset16To<> objects with max size
Unfortunately this doesn't speed up NotoNastaliq or Gulzar as I was
hoping for. Their GSUB tables are not large enough for this to kick
in...
2023-07-07 19:24:01 -06:00
Behdad Esfahbod 7a85663c2b Revert "[sanitize] Add "fastpath" for ArrayOfOffset16To<> objects with max size"
This reverts commit 10f8556c73.

This was, unfortunately, wrong :(.
2023-07-07 19:21:53 -06:00
Behdad Esfahbod f2a3680fab Revert "[gsubgpos] Limit (Chain)ContextFormat3 for consistency"
This reverts commit 90b48917da.
2023-07-07 19:21:03 -06:00