Commit Graph
13714 Commits
Author SHA1 Message Date
Behdad Esfahbod 86658df5d2 [ClassDef] Fix a fuzzer issue
Don't qsort an array that failed to allocate!

Fixes https://oss-fuzz.com/testcase-detail/6512559172485120
2023-05-05 16:10:46 -06:00
Behdad Esfahbod cda646a598 [subset-plan] Check success of all object members 2023-05-05 15:57:13 -06:00
Behdad Esfahbod 5f5660fc5d [subset] In glyf-closure always add current glyph
Bad things can happen otherwise if one composite glyph depleted
the op count.
2023-05-05 15:52:17 -06:00
Behdad Esfahbod 5468b08c02 [subset-plan] Move all object members to a new file
To automatically check for their errors.
2023-05-05 15:49:38 -06:00
Behdad Esfahbod 71910fdf91 [Coverage] Remove unnecessary check 2023-05-05 15:37:07 -06:00
Behdad Esfahbod ee9b631d19 [SingleSubst] Fix condition to upgrade to beyond-64k 2023-05-05 10:26:57 -06:00
Garret Rieger 8eb9f31263 [subset] s/Since/XSince/. 2023-05-05 15:56:50 +00:00
Behdad Esfahbod 5d4f3ff690 [TINY] Fix build 2023-05-05 07:10:02 -06:00
Behdad Esfahbod 7e676cb4cf [config] Add HB_NO_OT_FONT_ADVANCE_CACHE
Part of https://github.com/harfbuzz/harfbuzz/issues/4220
2023-05-05 07:07:00 -06:00
Behdad Esfahbod 8831ba7f55 [config] Add HB_NO_OT_FONT_CMAP_CACHE
Part of https://github.com/harfbuzz/harfbuzz/issues/4220
2023-05-05 07:03:25 -06:00
Behdad Esfahbod 0e9ebf1062 [config] Add HB_OPTIMIZE_SIZE_MORE and enable in HB_TINY
Part of https://github.com/harfbuzz/harfbuzz/issues/4220
2023-05-05 06:57:51 -06:00
Behdad Esfahbod da175c6935 [config] Add HB_MINIMIZE_MEMORY_USAGE
Part of https://github.com/harfbuzz/harfbuzz/issues/4220
2023-05-05 06:51:59 -06:00
Behdad Esfahbod bbf4cfa393 [config] Add missing HB_NO_BORING_EXPANSION options
Those others are only HB_EXPERIMENTAL_API anyway, but still.
2023-05-05 06:51:10 -06:00
Garret Rieger d339298f37 [subset] fix hb_subset_input_old_to_new_gid_mapping method comment. 2023-05-05 06:00:30 +00:00
Garret Rieger 3021b2dbe2 [subset] change glyph mapping api to return a mutable map.
Maintains consistency with our other set based api methods.
2023-05-05 05:57:05 +00:00
Garret Rieger 77a8155425 [subset] Add some basic tests for a provided glyph map. 2023-05-04 23:01:56 +00:00
Behdad Esfahbod 3194963657 Revert "[layout] Cache subtable coverages in hb_map_t"
This reverts commit 7a715d74e0.
2023-05-04 16:29:48 -06:00
Behdad Esfahbod 7a715d74e0 [layout] Cache subtable coverages in hb_map_t
Proof-of-concept. Going to revert. Memory consumption is more
than I like. It does speed up Roboto shaping another 15% though.
Perhaps if we could add logic to choose which subtables to
cache, this might be a useful approach.
2023-05-04 16:28:11 -06:00
Garret Rieger 98e73192f4 [subset] Add command line flag to provide a gid mapping. 2023-05-04 22:20:06 +00:00
Behdad Esfahbod 975980d368 [gsubgpos] Add apply_cached() as separate method
In prep for some other work.
2023-05-04 15:56:06 -06:00
Garret Rieger 779e8297fa [subset] fix requested_glyph_map presence check. 2023-05-04 19:55:32 +00:00
Garret Rieger e14020b27a [subset] remove return value from mapping setting function. 2023-05-04 19:55:32 +00:00
Garret Rieger 6826634714 [subset] apply the user supplied glyph map. 2023-05-04 19:55:32 +00:00
Garret Rieger e711e305c8 [subset] Add new subsetting API method to receive a user specified glyph mapping. 2023-05-04 19:55:32 +00:00
Behdad Esfahbod 1be3972914 [subset] Support unordered glyphlist in Coverage/ClassDef serialize 2023-05-04 13:18:34 -06:00
Behdad Esfahbod a10fad7cc2 [config] Add HB_NO_GDEF_CACHE 2023-05-04 11:32:07 -06:00
Behdad Esfahbod e138319fcc [config] Allow overriding HB_OPTIMIZE_SIZE 2023-05-04 11:28:50 -06:00
Behdad Esfahbod 319a488b39 [GDEF] Fix null check
Fixes https://oss-fuzz.com/testcase-detail/5920994267889664
2023-05-04 10:36:48 -06:00
Behdad Esfahbod 3f2401e2f1 [layout] Don't init iters successively multiple times 2023-05-03 17:03:12 -06:00
Behdad Esfahbod 959f16343b [gsubgpos] Minor reduce variable scope 2023-05-03 16:28:39 -06:00
Behdad Esfahbod fb795dc3c5 [GPOS] Optimize iterator reset
Speeds up Gulzar shaping 5%.
2023-05-03 15:17:36 -06:00
Behdad Esfahbod 0c1637b606 [aat] Fix HB_NO_OT_LAYOUT build 2023-05-03 15:04:57 -06:00
Behdad Esfahbod 8a8fc37c42 [GDEF] Use a cache for glyph classes
Shows 5% speedup for Roboto shaping.
2023-05-03 15:00:19 -06:00
Behdad Esfahbod 323a1fe496 [PairPos] Fix what I broke 2023-05-03 13:52:43 -06:00
Behdad Esfahbod a6f5f0dc4a [PairSet] Micro-optimize 2023-05-03 13:45:39 -06:00
Behdad Esfahbod 4e495eb0a7 [PairPos] Add an unlikely 2023-05-03 13:40:46 -06:00
Behdad Esfahbod 5528bdd46f [PairPos] Remove a likely 2023-05-03 13:35:10 -06:00
Behdad Esfahbod ae0fe02d13 [Ligature] Use slow path if 2 or fewer ligatures 2023-05-03 13:30:00 -06:00
Behdad Esfahbod ddd6c2e7a2 [Ligature] Micro-optimize more 2023-05-03 13:17:47 -06:00
Behdad Esfahbod 045ae4b0b5 [GPOS] Micro-optimize 2023-05-03 13:08:43 -06:00
Behdad Esfahbod 0fe90ebc00 [Ligature] Micro-optimize 2023-05-03 13:00:10 -06:00
Behdad Esfahbod 51061d2854 [Ligature] Minor tweak to recent code 2023-05-03 12:46:04 -06:00
Behdad Esfahbod 7881eadffc [Ligature] Speed up
Match the first component of the ligature in the LigatureSet loop.

Speeds up Roboto shaping by 25%. I don't think it breaks anything.
The test suite seems happy.
2023-05-03 12:41:31 -06:00
Behdad Esfahbod 95f155573c [PairPosFormat2] Micro-optimize and don't kern if class2=0
If class2=0 we expect no kerning to happen. Just bail out.
2023-05-02 16:37:31 -06:00
Behdad Esfahbod 5996715436 [PairPos2] Micro-optimize 2023-05-02 15:52:43 -06:00
Behdad Esfahbod 49ac5e11ef [match_input] Micro-optimize 2023-05-02 12:14:18 -06:00
Behdad Esfahbod 7e7f1d0414 Drop a pair of parantheses from likely/unlikely
Such that "if likely(...)" wouldn't compile.
2023-05-02 12:06:00 -06:00
Behdad Esfahbod db730f46d0 Simplify likely/unlikely
This surprisingly saves bytes and speeds up.
2023-05-02 11:55:10 -06:00
Behdad Esfahbod 2f9945ca01 [Glyph] Only treat numContours=-1 as Composite
Leave the other negative numbers as empty glyph.
2023-05-02 11:33:31 -06:00
Garret Rieger db23be642f [subset] clamp head *Min/*Max values to fit within 16 bit signed int.
Fixes fuzzer https://oss-fuzz.com/testcase-detail/4549472192692224.
2023-05-01 20:28:58 -06:00