Behdad Esfahbod
40ca30a82b
[subset] Improve GSUB closure memoize algorithm
...
Instead of memoizing the tuple of <lookup-idx,current-glyphs>, use a mapping of
lookup-idx->current-glyphs instead. Saves some work. Speeds up 5%ish on
NotoNastaliqUrdu-Regular.
2018-06-11 23:46:42 -04:00
Behdad Esfahbod
f3c06fba3f
Revert "[subset] Set to None empty Coverage tables in MarkGlyphSets"
...
This reverts commit 02616ab9b39d2e9618baebc4e051ae0a85200751.
Make OTS happy. Phew.
https://github.com/khaledhosny/ots/issues/172
2018-05-08 16:28:17 -07:00
Behdad Esfahbod
2ab38f9ba4
[subset] Handle None coverages in MarkGlyphSets
2018-05-08 15:24:36 -07:00
Behdad Esfahbod
02616ab9b3
[subset] Set to None empty Coverage tables in MarkGlyphSets
2018-04-25 20:59:18 -07:00
Behdad Esfahbod
fc819d6235
[subset] Don't drop a GDEF that only has VarStore
2018-04-25 16:10:57 -07:00
Behdad Esfahbod
1917d6913b
[subset] Remove more nonsensical code
...
Remaining parts of 4e3192163470ca168ff753cb526480e59bc77e1a
2018-04-25 16:09:30 -07:00
youlun
2bcca15c56
Add font-number parameter for subset
2018-04-16 12:47:25 +02:00
Cosimo Lupo
78faa0c416
subset: minor: remove duplicate 'cvar' from list of hinting tables
2018-04-13 17:39:10 +02:00
Behdad Esfahbod
ebdd52512b
[subset] Passthrough 'cvar'
...
https://github.com/fonttools/fonttools/issues/1237#issuecomment-381150772
2018-04-13 16:38:46 +02:00
Cosimo Lupo
4dfc7bf24e
subset: remove assert to handle HVAR direct mapping
...
It looks like this was (at least partially) implemented in
f01c86ca9b
Should fix https://github.com/fonttools/fonttools/issues/1237
I'm still not sure about that "File a bug." when AdvWidthMap is None,
but either LsbMap or RsbMap are not None..
And we still need to add tests for this though.
2018-04-13 15:16:31 +02:00
Behdad Esfahbod
4e31921634
[varLib] Remove nonsensical code
...
GSUB has no positioning, so cannot have any Device tables with variations.
2018-02-21 00:19:54 -08:00
Behdad Esfahbod
ba52a32fed
[varStore] Refactor code around
2018-02-19 19:07:22 -08:00
Behdad Esfahbod
7657f0c899
[varStore] Minor
2018-02-19 18:59:12 -08:00
Behdad Esfahbod
64834d079d
[varStore] Add subset_varidxes as method on VarStore
2018-02-19 18:57:09 -08:00
Behdad Esfahbod
f01c86ca9b
[subset] Handle direct mapping in HVAR/VVAR
...
Untested. Sigh...
Last part of https://github.com/fonttools/fonttools/issues/1179
2018-02-18 23:25:42 -08:00
Behdad Esfahbod
200268846a
[subset] Fold prune_post into subset for HVAR/VVAR
...
Need to finish direct mapping.
2018-02-18 23:18:34 -08:00
Behdad Esfahbod
3cfc4a4be2
[subset] Move code around
2018-02-18 23:16:00 -08:00
Behdad Esfahbod
e33ba6ddd6
[subset] Assert HVAR/VVAR case we do NOT handle
...
For now fixes https://github.com/fonttools/fonttools/issues/1179
2018-02-18 23:08:46 -08:00
Behdad Esfahbod
788a306e4a
[subset] Prune HVAR/VVAR
...
Part of https://github.com/fonttools/fonttools/issues/1179
2018-02-18 23:06:21 -08:00
Behdad Esfahbod
d1b335505c
[subset] Implement basic HVAR/VVAR support
...
Needs more work.
Part of https://github.com/fonttools/fonttools/issues/1179
2018-02-18 22:41:11 -08:00
Behdad Esfahbod
d5c480aabd
[subset] If a table is dropped because we don't know it, warn, not log
2018-02-18 19:30:39 -08:00
Behdad Esfahbod
67814fd3b3
[subset] Prune GDEF VarStore
...
Mostly fixes https://github.com/fonttools/fonttools/issues/1179
2018-02-18 19:20:00 -08:00
Cosimo Lupo
d2298be083
[subset] modify --name-IDs help message to match new defaults
2018-02-16 17:58:14 +00:00
Behdad Esfahbod
25d3822275
[subset] Fixup for previous commit
2018-02-16 09:54:32 -08:00
Behdad Esfahbod
6eac96b2f5
[subset] Add nameIDs 0 and 5 as well and fix docstring
...
Fixes https://github.com/fonttools/fonttools/issues/1170
2018-02-16 09:32:29 -08:00
Behdad Esfahbod
007a72ac29
[subset] Change indentation to tabs
2018-02-14 01:32:54 -08:00
Behdad Esfahbod
3c717c7867
[subset] Starting to implement pruning VarStores
...
Part of https://github.com/fonttools/fonttools/issues/1179
2018-02-14 01:19:03 -08:00
Behdad Esfahbod
43ea974329
[subset] Include nameIDs 3, 4, 6 by default
...
Fixes https://github.com/fonttools/fonttools/issues/1170
2018-02-10 13:01:59 -06:00
Behdad Esfahbod
d723b695e7
[subset] Close glyphs over CFF
...
Fixes https://github.com/fonttools/fonttools/issues/1162
2018-01-26 17:41:53 -08:00
Hugo Giraudel
6a5fc617de
Fix typo in --glyphs option description
2017-11-28 13:07:06 +01:00
Cosimo Lupo
ca8963e527
[subset] pass a PrivateDict instance to _delete_empty_subrs func
2017-11-27 20:29:11 +00:00
Cosimo Lupo
cad8a8c072
minor
2017-11-27 20:24:32 +00:00
Cosimo Lupo
42d11cfd3e
[subset] delete empty SubrsIndex after subsetting
...
Fixes https://github.com/fonttools/fonttools/issues/994
2017-11-27 19:37:19 +00:00
Cosimo Lupo
28bb992c1f
replace int(round(...)) with round(...)
...
We don't need to cast to int when using the round function from py23,
as this is a backport of python3's built-in round and thus it returns
an int when called with a single argument.
2017-10-22 12:03:52 +01:00
Behdad Esfahbod
93763eec0b
Minor
2017-09-15 00:58:42 -04:00
Sascha Brawer
898f6911f8
[AAT] Implement subsetting of anchor points table
2017-08-31 12:49:55 +02:00
Behdad Esfahbod
48bb8d9d59
[subset] Further minor simplification
2017-08-27 18:31:34 -07:00
Behdad Esfahbod
2d755f0d39
[subset] Simplify glyf.closure_glyphs() similarly
2017-08-27 18:30:04 -07:00
Behdad Esfahbod
61ac8e7589
[subset] Simplify COLR.closure_glyphs()
2017-08-27 18:27:03 -07:00
Sascha Brawer
307d0d4c57
[AAT] Implement subsetting of baseline table
2017-08-26 09:53:04 +02:00
Sascha Brawer
16a4001901
[AAT] Implement subsetting of lcar
ligature carets table
2017-08-25 07:35:13 -07:00
Sascha Brawer
84b0cacf95
[AAT] Implement subsetting of opbd
Optical Bounds table
2017-08-22 14:36:05 -07:00
Sascha Brawer
28b179a018
[AAT] Implement subsetting of prop
table with AAT glyph properties
2017-08-22 08:06:59 -07:00
Behdad Esfahbod
6eb807b55f
[subset] Keep (empty) DefaultLangSys for Script 'DFLT'
...
That's still required by the spec.
https://bugzilla.mozilla.org/show_bug.cgi?id=1331737#c32
2017-08-11 14:51:15 -07:00
Behdad Esfahbod
fe01d87b94
[subset] Support GSUB/GPOS.FeatureVariations
...
We should add a test using the font at:
https://github.com/behdad/harfbuzz/issues/521
Test with:
$ fonttools subset avar_rvrn.ttf --text=r
2017-08-08 17:21:58 -07:00
Behdad Esfahbod
b2e9882b30
[subset] Update list of features
2017-08-08 17:21:58 -07:00
Cosimo Lupo
c0d672ba70
[subset] return value from _DehintingT2Decompiler.op_hintmask
...
The `_SimpleT2Decompiler.execute` method expects that handlers for
hintmask/cntrmask operators return a tuple of (hintMaskBytes, index).
The index value is used to skip to the next token following the
hintmask bytes.
However, the `_DehintingT2Decompiler.op_hintmask` method was returning
None, thus the hintmask bytes were evaluated as the following token
instead of being consumed as such; but since in legacy python 2
`isinstance(token, basestring)` is True for both operators and
hintmask bytes, the latter might sometimes be wrongly interpreted
as operators!
For example, the hintmask bits '0110111101110010', encoded as a
bytes string `'\x6f\x72'` was being confused for the unimplemented
`'or'` operator...
Fixes #1006
2017-07-20 21:45:30 +01:00
Behdad Esfahbod
787b39d9b5
[subset] Add MVAR and STAT as no-susbetting-needed tables
2017-04-14 15:27:52 -07:00
Miguel Sousa
e69960cce0
[subset] Remove outdated comment from instructions
...
https://github.com/fonttools/fonttools/issues/144#issuecomment-290982065
2017-04-12 18:26:38 -07:00
Cosimo Lupo
46d487c728
the Zopfli bindings are finally available from PyPI, change url in the docstring
2017-03-01 14:01:15 +00:00