Garret Rieger
73ed59f7a6
[subset] store errors in the serializer as a flag set.
...
Make check_assign/check_equal specify the type of error to set.
2021-03-17 15:58:34 -07:00
Qunxin Liu
56ca435787
[subset] fix for collect_features and remove_redundant_lamngsys
...
previously remove_redundant_sys () is missing in harfbuzz, after
redundant langsys removal, some features are removed as well in
prune_features() in fonttools. This change is trying to get the same
result between harfbuzz and fonttools.
2021-03-17 14:24:04 -07:00
Garret Rieger
2df39bcae7
[subset] don't allocate a set to use as a glyph filter for PairPosFormat2.
2021-03-16 14:49:35 -07:00
Garret Rieger
bb54e1047d
[subset] Also filter class1 by coverage when collecting variation indices for PairPosFormat2.
2021-03-16 14:49:35 -07:00
Garret Rieger
190b7a98f8
[subset] Update PairPosFormat2 subsetting to match fontTools updated subsetting ( https://github.com/fonttools/fonttools/pull/2221 )
...
- subset class def 1 against the coverage table.
- Don't re-use class 0 in class def 2.
- Ignore class 0 glyphs for the purposes of determing format 1 vs format 2 encoding for ClassDef.
Add an additional test case which demonstrates these issues.
2021-03-16 14:49:35 -07:00
Behdad Esfahbod
103ed7da83
[subset] Use dagger
...
Better fix for https://github.com/harfbuzz/harfbuzz/pull/2858
2021-02-19 16:48:30 -07:00
Garret Rieger
5ca353a2d0
[subset] fix heap buffer overflow found by fuzzer.
2021-02-16 12:43:02 -07:00
Behdad Esfahbod
c7d232ce4e
Merge pull request #2701 from googlefonts/Mark-To-Ligature_grieger
...
[subset] GPOS 5 MarkToLigature subsetting support
2021-02-10 18:13:38 -07:00
Garret Rieger
1d9801e012
[subset] In AnchorMatrix::subset eliminate the use of dynamically allocated vector.
2020-10-05 14:43:29 -07:00
Garret Rieger
093909b2ff
[subset] Fix wrong offset base for subsetting LigatureArray.
...
Offsets from LigatureArray must be relative to the beginning of the LigatureArray table. For the serialization mechanism to use the correct beginning point the LigatureArray must be created using the push()/pop() mechanism. So convert LigatureArray subsetting to use serialize_subset() instead of a manually called serialize and subset.
2020-10-05 13:14:53 -07:00
Garret Rieger
147e93b910
[subset] Fixes to get GPOS 5 subsetting code compiling.
2020-10-01 16:45:57 -07:00
Qunxin Liu
3a0b05faf1
[subset] GPOS 5 MarkToLigature subsetting support
2020-10-01 15:59:16 -07:00
Garret Rieger
e583505334
[subset] Use plan->glyphset_gsub instead of plan->glyphset for GSUB/GPOS
...
This matches fontTools behaviour. glyphset_gsub does not contain gids added from closing over composite glyphs in glyf, since these cannot particpate in GSUB/GPOS processing.
2020-09-29 11:16:15 -07:00
Behdad Esfahbod
fce64a407d
Minor
2020-08-08 14:05:03 -06:00
Ebrahim Byagowi
5a7cc7fd8b
minor spacing tweak
2020-07-29 08:33:38 +04:30
Ebrahim Byagowi
d0e2addd43
minor
2020-07-18 22:16:02 +04:30
Behdad Esfahbod
9ef9ac3749
[gpos] Break cycle-of-2 when cursive attaching
...
Fix thinko this time around.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2469
2020-06-17 22:59:10 -07:00
Behdad Esfahbod
3fe7195713
Revert "[gpos] Break cycle-of-2 when cursive attaching"
...
This reverts commit 7090707de6
.
2020-06-17 17:51:08 -07:00
Behdad Esfahbod
7090707de6
[gpos] Break cycle-of-2 when cursive attaching
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2469
2020-06-17 17:41:48 -07:00
Qunxin Liu
973c47f6c9
[subset] Move 2 experimental public api methods to be private methods in GSUB/GPOS.
...
2 methods are: hb_ot_layout_closure_lookups and hb_ot_layout_closure_features
2020-06-12 01:20:30 +04:30
Behdad Esfahbod
56719474c2
s/blacklist/blocklist/g
2020-06-05 12:57:23 -07:00
Qunxin Liu
d7c012a08e
[subset] GDEF Variation Store: step 2
...
do subset based on variation indices collected in step 1
2020-05-21 12:43:24 -07:00
Qunxin Liu
8200e48ffc
[subset] GDEF Variation Store: step 1
...
closure device variation indexes, create old->new variation idx mapping
and store them in subset-plan
2020-05-21 12:43:24 -07:00
Behdad Esfahbod
5cf53c06e6
Rename add_coverage to collect_coverage
2020-04-24 08:16:03 -07:00
Ebrahim Byagowi
2dda6dd744
minor, tweak spacing
...
turn 8 spaces to tab, add space before Null/Crap
2020-04-20 16:18:29 +04:30
Qunxin Liu
c8cc1e378d
fix issues in ClassDefFormat1 serialize:
...
glyph ids in Iterator may be non-consecutive,
so the number in classValue might be larger than length of the Iterator
2020-04-03 12:31:48 -07:00
Garret Rieger
2f556c38c0
[subset] Fix crash when serializer runs out of room during gpos subsetting.
2020-03-14 00:55:47 +03:30
Ebrahim Byagowi
07acd1a042
[subset] Rename src_base args to base to match sanitize methods
...
So it will become easier to follow that serialize methods signatures should
match with their sanitize methods counterparts.
2020-03-08 23:39:26 +03:30
ariza
188a0a47c2
removed default base; replaced w/ bias if required
2020-03-08 22:59:43 +03:30
Qunxin Liu
eb7849a806
[subset] GPOS6 MarkToMark subsetting support
2020-02-06 10:46:05 -08:00
Qunxin Liu
82afc75835
[subset] GPOS4 MarkBase subsetting support
2020-02-06 10:46:05 -08:00
ariza
1ab3924b31
refix PR #2087 subset PairPos1
...
also added oss-fuzz 20211 data fixed by this
2020-01-23 10:50:52 -08:00
ariza
72cbfb9059
remove empty lookup subtables
...
Added a variant of subset_offset_array which takes an extra arg passed to serialize_subset for this impl.
Added a new api test "test-subset-gpos" for this.
2020-01-21 16:53:19 -08:00
Michiharu Ariza
c828d7bf76
[subset] fixed GPOS device table sanitize & serialize ( #2087 )
2020-01-15 15:32:44 -08:00
Qunxin Liu
e565d1f9bc
[subset] subset lookup/feature/script lists for GSUB/GPOS
2020-01-15 14:04:33 -08:00
Qunxin Liu
0b39c48064
[subset] closure lookups for GSUB/GPOS
2020-01-10 13:11:06 -08:00
Behdad Esfahbod
a061e47fcc
Change a few HB_INTERNAL static methods to static inline
2019-12-10 13:31:50 -06:00
Behdad Esfahbod
dd3972a364
[GSUB] Simplify Extension is_reverse()
...
We don't allow extension lookups to chain to another extension lookup.
Simplify code for that.
2019-12-10 13:28:39 -06:00
Behdad Esfahbod
858b627984
[machinery] Remove CastR<>()
2019-12-10 13:18:32 -06:00
Behdad Esfahbod
b84ceb2fcf
[machinery] Remove CastP
2019-12-10 13:02:48 -06:00
Behdad Esfahbod
39afe608b4
[algs] Fold one more custom bsearch() in
...
One more to go.
2019-12-10 12:13:40 -06:00
Ebrahim Byagowi
486754a888
[serialize] Extract iterable copy, copy_all
2019-10-31 13:31:11 -07:00
Qunxin Liu
defe9b6da0
crash fix : Heap-buffer-overflow READ 2
...
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18513
2019-10-25 13:09:47 -07:00
Qunxin Liu
1f0a9d9be9
[subset] GPOS Lookup Type 2: PairPos
2019-10-21 12:35:28 -07:00
Ebrahim Byagowi
0558413f27
Minor, tweak spaces
2019-10-01 13:50:11 +03:30
Qunxin Liu
b0c3eb06b6
[subset] GPOS Lookup Type 3: CursivePos
2019-09-25 05:43:25 +09:00
Ebrahim Byagowi
68d39ea486
Revert previous change and fix -Wrange-loop-analysis complains
2019-09-24 13:52:46 +03:30
Ebrahim Byagowi
cbc0646a6c
Minor, normalize for each calls
2019-09-24 12:09:20 +03:30
Ebrahim Byagowi
f0a7677993
[gpos] minor
2019-09-23 21:09:39 +03:30
Ebrahim Byagowi
c1a585fab0
[gpos] minor
2019-09-21 23:36:29 +04:30