Cosimo Lupo
842289c00e
Merge pull request #1944 from anthrotype/fix-subset-context-format-3
...
subset: fix AttributeError while subsetting Context{Subst,Pos} Format 3
2020-05-13 10:19:10 +01:00
Simon Cozens
2cef07af80
[doc] Add help options to fonttools CLI ( #1920 )
...
This adds a `help` verb (and `--help` option) to the `fonttools` command line tool. Submodules will be listed in the help text if they have an importable `main` function with a docstring, and `main`'s docstring will be used as the one-line description for the help text.
2020-05-12 06:31:13 +01:00
Cosimo Lupo
890c5061b5
subset: fix issue subsetting Context{Subst,Pos}Format3
...
Fixes https://github.com/fonttools/fonttools/issues/1879
In ChainContext{Subst,Pos}Format3, the array of input coverages is called
InputCoverage, whereas in non-Chain Context{Subst,Pos}Format3 subtables it
is called simply Coverage.
2020-05-11 13:32:18 +01:00
Cosimo Lupo
c8f591ea8a
subset: remove FeatureVariations table and downgrade to version 0x10000 when empty
...
https://github.com/fonttools/fonttools/issues/1881#issuecomment-620719882
2020-04-28 18:34:15 +01:00
Behdad Esfahbod
cab7d13dc0
[subset] FeatureVariations subsetting is wrong
...
Fixes https://github.com/fonttools/fonttools/issues/1881
2020-04-20 12:10:05 -07:00
Cosimo Lupo
53c99df8f8
subset: downgrade SinglePos to format 1 if all ValueRecords are same
...
Fixes https://github.com/fonttools/fonttools/issues/1709
2020-01-16 18:34:12 -08:00
Cosimo Lupo
d68a59a2f2
subset: remap FeatureVariations SubstitutionRecord.FeatureIndex
...
Fixes #1777
2019-12-12 12:38:31 +00:00
Cosimo Lupo
246e52be70
susbet: minor
2019-09-10 16:52:56 +02:00
Cosimo Lupo
644d7e3b9a
Merge pull request #1698 from khaledhosny/subset-ebdt-fix
...
[subset] Prune empty strikes in EBDT data
2019-09-10 16:45:29 +02:00
Chris Simpkins
791f619029
refactor array.tostring to array.tobytes
...
the array.tostring method is deprecated
2019-08-29 23:21:22 -04:00
Khaled Hosny
61bc8458ef
[subset] Prune empty strikes in EBDT data
...
After subsetting some strikes might be empty (strikes don’t have to
cover all glyphs equally) which would cause a key error later when
saving the table.
Fixes https://github.com/fonttools/fonttools/issues/1633
2019-08-17 00:59:44 +02:00
Nikolaus Waxweiler
01328213c7
Remove __future__ imports
2019-08-09 12:20:13 +01:00
Khaled Hosny
4db8cb237f
[subset] Support sbix table
...
Test font is a subset of:
https://github.com/djrrb/Bungee/blob/master/fonts/Bungee_Color_Fonts/BungeeColor-Regular_sbix_MacOS.ttf
2019-08-01 01:52:38 +02:00
Khaled Hosny
a56b1af2f6
[subset] Gracefully handle partial MATH table ( #1635 )
...
Both MathGlyphInfo and MathVariants can be None, so check for that first
before trying to access their methods.
2019-06-08 17:59:53 -07:00
Behdad Esfahbod
ce21271c2d
[subset] Use _list_subset() more
2019-05-27 13:56:46 -04:00
Behdad Esfahbod
77b394101f
[subset] Skip out-of-range class values in mark attachment
...
Fixes https://github.com/fonttools/fonttools/issues/1478
2019-05-27 13:52:26 -04:00
Behdad Esfahbod
d38e26d324
[subset] Whitespace
2019-05-27 13:44:20 -04:00
Khaled Hosny
2861d65e56
[subset] Update font extents in head table
...
When --recalc-bounds option is used the font extents in the head table
need to be updated, but since tables are lazy-loaded by default the
table will not be recompiled and will keep the old value. Force
recompiling the table by adding it to prune_post_subset tables, though
I’m not 100% sure this is the best approach.
2019-05-17 21:10:11 +02:00
Garret Rieger
dce15980fd
Make --retain-gids truncate empty glyphs after the last non-empty glyph.
2019-05-16 10:13:33 -07:00
Miguel Sousa
9cbfef1972
Merge pull request #1588 from fonttools/hvar-vvar-retain-gids
...
[subset] HVAR/VVAR with --retain-gids
2019-04-26 06:55:17 -07:00
Miguel Sousa
45596108e2
(Re)calculate OS/2.usMaxContext value
...
The value is only modified in the context of fontBuilder or subset. It will NOT be modified when using ttx.
maxContextCalc.py was copied from https://github.com/googlefonts/ufo2ft/blob/master/Lib/ufo2ft/maxContextCalc.py
Fixes #1191
Fixes #466
2019-04-24 18:31:12 -07:00
Michiharu Ariza
00dddb1c32
fixed non retain-gids with no AdvWidthMap behavior
...
deltas in VarData[0] are directly look up by GID so compacted
if any deltas are referenced by LsbMap / RsbMap but not used for advance widths, they are moved to the end of VarData[0]
updated expected test result expect_HVVAR.ttx accordingly
2019-04-24 16:46:21 -07:00
Michiharu Ariza
6ca384fecd
tweaks reflecting review
2019-04-24 09:26:17 -07:00
Michiharu Ariza
f028c75d2a
issue #1587 : AdvWidthMap null with Lsb/RsbMaps non-null
...
along with tests
2019-04-23 17:03:04 -07:00
Michiharu Ariza
12d1b053f7
renaming
2019-04-23 09:28:03 -07:00
Michiharu Ariza
5e1dea329b
subset HVAR/VVAR with retain-gids
...
1. if AdvWidthMap/AdvHeightMap missing, deltas for unused (emptied) glyphs are zeroed
2. If indexMap exists and unused glyph ID <= last used glyph ID, then its major/minor number set to 0/0
3. If indexMap exists and unused glyph ID > last used glyph ID, then its major/minor number set to that of the last used glyph (removed from table)
2019-04-22 16:56:01 -07:00
Cosimo Lupo
0cf54802c5
[subset] fixed VVAR subset failing with --retain-gids
...
Fixes https://github.com/fonttools/fonttools/issues/1552
2019-04-08 17:28:05 +01:00
ReadRoberts
635537604d
Fix for subsetting HVAR tables that have an AdvanceWidthMap when the --retain-gid option is used. Needed to make subset_test.py::test_retain_gids_cff2 tests pass.
2019-03-19 16:27:21 +00:00
justvanrossum
723e7a1d3c
updated inline github issue URLs
2019-03-06 16:01:28 +01:00
Khaled Hosny
835ee4a84b
[subset] Update documentation to reflect reality [ci skip]
...
CBLC/CBDT are no longer dropped by default since
9189d1a1f04a7a808ad9940dc14eb072ff25f115.
2019-03-03 02:30:35 +02:00
Michiharu Ariza
c8d4149b32
Fix issue #1516 : subset VVAR ( #1517 )
...
* fix #issue 1516: subset VOrgMap
* fixed BsbMap as well
* fix bad edit
2019-02-22 19:23:04 -05:00
Garret Rieger
d376057fb6
Insert empty widths into hdmx when retaining gids.
2019-01-18 17:32:04 -08:00
Behdad Esfahbod
dd081d64dc
[subset] Add --retain-gids to retain glyph indices
2019-01-14 16:45:50 -05:00
Behdad Esfahbod
18cfe2371a
[CFF} Rename subset.cffLib to subset.cff
2018-11-29 14:09:57 -05:00
Behdad Esfahbod
d423236019
[CFF] Unbreak subsetter
2018-11-29 14:08:42 -05:00
ReadRoberts
d2d31e57c8
[varLib.mutator] Move CFFs interpolation functions
...
from subset.__init.py and mutator.py into subset.cffLib.py
2018-11-19 20:10:46 -08:00
ReadRoberts
cf38e84f85
[varLib.mutator] Move test for interpolating CFF2 tables
...
from varLib_test.py to mutator_test.py
2018-11-19 20:09:11 -08:00
Cosimo Lupo
f99afc70d3
Merge pull request #1326 from BoboTiG/fix-resource-leak
...
Fix several ResourceWarning: unclosed file and some related improvement
2018-11-16 23:00:24 +00:00
Behdad Esfahbod
e30b830403
Merge pull request #1368 from fonttools/varLib-sparse-masters
...
[varLib] Support sparse masters
2018-11-15 15:00:00 -08:00
Behdad Esfahbod
0ab515b39e
[subset] If charString dehinted to empty, add "endchar"
...
Fixes https://github.com/fonttools/fonttools/issues/1379
2018-11-15 01:30:26 -05:00
Behdad Esfahbod
986562fe10
[subset] Remove old cruft
2018-11-08 23:16:43 -05:00
Behdad Esfahbod
76c85e3c3b
[subset] Fix --no-hinting --desubroutinize
...
Fixes https://github.com/fonttools/fonttools/issues/1360
2018-11-02 17:52:15 -04:00
Cosimo Lupo
50dae4cc90
subset: don't error if STAT has no AxisValue tables
...
the minimalist STAT table that varLib produces only contains one DesignAxisRecord
for each fvar axis, and has AxisValueCount=0, thus the AxisValueArray offset is None.
2018-10-30 10:32:36 +00:00
Rob McKaughan
7d59b729ab
Include nameIDs referenced by STAT table
2018-09-26 14:50:22 -04:00
Mickaël Schoentgen
ee244406ee
Fix several ResourceWarning: unclosed file in subset
2018-09-25 23:04:26 +02:00
Michiharu Ariza
90176ef842
--no-hinting to drop LanguageGroup etc
2018-09-19 22:33:39 +02:00
Behdad Esfahbod
1bec227849
[subset] Fix partial subsetting of AlternateSubst
2018-09-10 15:12:38 +02:00
Behdad Esfahbod
022536212b
[subset] Add --no-layout-closure
...
As oft requested.
I think this fixes https://github.com/fonttools/fonttools/issues/43
2018-09-10 15:09:11 +02:00
Behdad Esfahbod
c895f4f4a2
[subset] Add --layout-scripts
...
Fixes https://github.com/fonttools/fonttools/issues/1303
2018-08-01 14:29:06 -07:00
Cosimo Lupo
d7ac0ad359
subset: write default file extension based on --flavor or sfntVersion
...
Fixes https://github.com/fonttools/fonttools/issues/1298
2018-07-21 18:28:33 +01:00