Commit Graph

143 Commits

Author SHA1 Message Date
Behdad Esfahbod 9eab3ac72d [CoverageFormat2] Remove hand-written loop
While on a fuzzer-found test case (added) that loop was faster,
on real fonts, including NotoNastaliq in our benchmark, it was
actually slower, which intuitively I would have expected.

Still no idea why on that fuzzer case it's faster though. :(
2022-07-21 12:36:53 -06:00
Behdad Esfahbod bbb4db90dd [Coverage/SingleSubst] Move hand-written loop to Coverage 2022-07-21 12:34:46 -06:00
Behdad Esfahbod 7b95783efb [Coverage] Internal rename 2022-07-21 12:18:51 -06:00
Behdad Esfahbod afa65f2903 [Coverage] Minor type change 2022-07-21 12:17:08 -06:00
Behdad Esfahbod b38587aa0b [Coverage] Internal renames 2022-07-21 12:14:06 -06:00
Behdad Esfahbod 84d38df828 [Coverage] Minor use range-based loop 2022-07-21 12:12:04 -06:00
Behdad Esfahbod b017b73ffe [Coverage] Minor remove a couple unnecessary as_array()'s 2022-07-21 12:06:55 -06:00
Behdad Esfahbod 9e650b4e0c [Coverage] Speedup intersect_set 2022-07-21 12:01:52 -06:00
Behdad Esfahbod efa388074d [subset/SingleSubsetFormat1] Use Coverage.intersect_set 2022-07-21 11:52:36 -06:00
Behdad Esfahbod 00dfbbce1c [Coverage] Rename and templatize intersected_coverage_glyphs 2022-07-21 11:45:05 -06:00
Behdad Esfahbod d0eb273791 [subset/GSUB/GPOS] Use more intersected_coverage_glyphs() 2022-07-21 11:24:56 -06:00
Behdad Esfahbod 450d834679 [subset/PairPosFormat1] Speed up significantly 2022-07-21 11:05:35 -06:00
Behdad Esfahbod 5d7556e184 Revert "[subst/SingleSubstFormat1] Rewrite nicer"
This reverts commit bababe1072.

The hand-written code is still much faster :(.
2022-07-21 10:58:36 -06:00
Behdad Esfahbod 71ce931e6d [PairPos] Don't compute newFormat
It was wrong, because it would be writing wrong values.

Test suite doesn't seem to catch any.
2022-07-21 10:41:29 -06:00
Behdad Esfahbod 02ca025443 [layout] Add large_int to Types 2022-07-21 10:30:23 -06:00
Behdad Esfahbod bababe1072 [subst/SingleSubstFormat1] Rewrite nicer 2022-07-21 10:25:27 -06:00
Behdad Esfahbod cf123e6a0d [Coverage] Add get_population () 2022-07-21 10:24:04 -06:00
Behdad Esfahbod fa471043fc [subset] Fix previous commit 2022-07-20 22:42:18 -06:00
Behdad Esfahbod c4d2ef9004 [subset] Speed up subsetting of SingleSubstFormat1_3 2022-07-20 22:36:35 -06:00
Behdad Esfahbod d01e6babe6 [subset] Speed up SingleSubstFormat1_3 closure 2022-07-20 22:17:33 -06:00
Behdad Esfahbod aae8c74e05 [>64k:layout:SingleSubstFormat3] Fix masking
https://github.com/be-fonts/boring-expansion-spec/issues/31
2022-07-20 11:51:27 -06:00
Behdad Esfahbod 3c137ef041 [GPOS/CursivePos] Fix unsafe-to-break marking
Fixes test.
2022-07-20 11:29:30 -06:00
Behdad Esfahbod 54e9ab4a91 [GPOS/Cursive] Fix breaking of parent-child attachment
Mostly fixes https://github.com/harfbuzz/harfbuzz/issues/2469
2022-07-18 18:57:14 -06:00
Behdad Esfahbod 89de8c700f [CoverageFormat2] Another fix for broken tables
Fixes https://oss-fuzz.com/testcase-detail/6005342714068992
2022-07-18 13:07:29 -06:00
Behdad Esfahbod d8574b44cc [CoverageFormat2] Fix iterator to avoid infinite loop
on invalid data.

Fixes https://oss-fuzz.com/testcase-detail/5304497047470080
2022-07-17 18:44:27 -06:00
Behdad Esfahbod af84680f23 [GSUB] Remove a reinterpret_cast 2022-07-17 12:00:04 -06:00
Garret Rieger d82ace5c6f [reorg] add TODO to RangeRecord. 2022-07-13 20:25:13 -06:00
Garret Rieger c1e280ea78 [reorg] Move Coverage, RangeRecord into new namespace layout. 2022-07-13 20:25:13 -06:00
Behdad Esfahbod a2f0723148 [GPOS] Adjust mark attachment on multiple substitution some more
Fixes https://github.com/harfbuzz/harfbuzz/issues/1545
2022-07-13 16:02:39 -06:00
Behdad Esfahbod 7549d447ba [>64k:glyf] Implement composites for >64k
Implements https://github.com/be-fonts/boring-expansion-spec/issues/42
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 09de94788b [>64k:glyf] Hid composite glyphIndex 2022-07-12 13:42:52 -06:00
Behdad Esfahbod cc83b0b8fd [>64k:layout:MarkBasePos/MarkMarkPos/MarkLigPos] Implement format 2
Implements https://github.com/be-fonts/boring-expansion-spec/issues/40

Subset does NOT lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 4b43070e2f [>64k:layout] Templatize MarkBasePos/MarkMarkPos/MarkLigPos 2022-07-12 13:42:52 -06:00
Behdad Esfahbod f0d6dda5a6 [>64k:layout:PairPos] Implement format 3
Implements rest of https://github.com/be-fonts/boring-expansion-spec/issues/38

Subset does NOT lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 298ee47c55 [>64k:layout] Templatize PairPosFormat1 2022-07-12 13:42:52 -06:00
Behdad Esfahbod e9f8010fd0 [>64k:layout:PairPos] Templatize & implement format 4
Implements part of https://github.com/be-fonts/boring-expansion-spec/issues/38

Subset does NOT lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod ecd8bc5a9c [>64k:layout:LigatureSubst] Implement format 2
Implements https://github.com/be-fonts/boring-expansion-spec/issues/33

Subset does NOT lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 704e696ad0 [>64k:layout] Templatize LigatureSubst 2022-07-12 13:42:52 -06:00
Behdad Esfahbod 27d24212db [>64k:layout:AlternateSubst] Implement format 2
Implements rest of https://github.com/be-fonts/boring-expansion-spec/issues/32

Subset does NOT lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod c53d3ad51e [>64k:layout] Templatize AlternateSet 2022-07-12 13:42:52 -06:00
Behdad Esfahbod a58a48622a [>64k:layout:MultipleSubst] Implement format 2
Implements part of https://github.com/be-fonts/boring-expansion-spec/issues/32

Subset is NOT updated to lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 684c8fcea7 [>64k:layout] Templatize MultipleSubst 2022-07-12 13:42:52 -06:00
Behdad Esfahbod 8775e9b4a4 [>64k:layout:SingleSubst] Implement format 3/4
Implements https://github.com/be-fonts/boring-expansion-spec/issues/31
2022-07-12 13:42:52 -06:00
Behdad Esfahbod e3caf8d50a [>64k:layout] Templatize SingleSubst 2022-07-12 13:42:52 -06:00
Behdad Esfahbod d15041be7d [GSUB/GPOS] Trace toplevel sanitize 2022-07-12 11:11:22 -06:00
Behdad Esfahbod 5192294f83 . 2022-07-08 14:09:04 -06:00
Behdad Esfahbod 8a107125a5 [layout] Make SubstLookup:serialize_single take iterators 2022-07-08 12:02:11 -06:00
Behdad Esfahbod ea11029a6e [GPOS] Split LigatureArray.hh 2022-07-08 11:58:43 -06:00
Behdad Esfahbod 68b2742fe4 [GPOS] Move code around 2022-07-07 16:11:15 -06:00
Behdad Esfahbod 6a3043a0c1 Fix tests 2022-07-07 14:51:37 -06:00