7075 Commits

Author SHA1 Message Date
Cosimo Lupo
28fb29e758
instancer: make 'None' mean to drop an axis, or pinning at default
This allows to drop an axis (aka L1 instancing) without knowing the
axis' actual default value from fvar table. One can simply call
`instantiateVariableFont` function with a `None` value for a given
axis (i.e. axis_limits={'wght': None}); the `None` value is replaced
by the axis default value as per fvar table.

The same can be done from the console script as well.
The special string literal 'None' is parsed as the Python `None`
object. E.g.:

$ fonttools varLib.instancer MyFont-VF.ttf wght=None
2019-05-20 17:31:46 -04:00
Khaled Hosny
83db5ed132
Merge pull request #1614 from khaledhosny/varlib-gdef-glyphclass
[varLib] Fix merging GDEF.GlyphClassDef in mutator
2019-05-18 04:52:37 +02:00
Khaled Hosny
7e5644a0a8 [varLib] Fix merging GDEF.GlyphClassDef in mutator
The code was setting GlyphClassDef.classDefs for the base font to an
empty dict then reading it from all fonts. It accidentally works when
creating variable fonts because the GlyphClassDef of the other fonts
will be used, but when mutating there is only one font.

Fix by reading the glyph classes before assigning to an empty dict.
2019-05-18 04:44:34 +02:00
Khaled Hosny
6f5bb7822f
Merge pull request #1613 from khaledhosny/varlib-cli-logging
[varLib] Command-line options to configure logging
2019-05-18 03:59:10 +02:00
Khaled Hosny
6052357f14 [varLib] Command-line options to configure logging 2019-05-18 01:57:57 +02:00
Khaled Hosny
9c0811c066
Merge pull request #1612 from khaledhosny/subset-head
[subset] Update font extents in head table
2019-05-17 21:17:18 +02: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
Cosimo Lupo
467d1c09b1
Merge pull request #1611 from googlefonts/retain-gids
Make --retain-gids truncate empty glyphs after the last non-empty glyph.
2019-05-16 13:57:04 -04:00
Garret Rieger
dce15980fd Make --retain-gids truncate empty glyphs after the last non-empty glyph. 2019-05-16 10:13:33 -07:00
Cosimo Lupo
27a8ba480d
Merge remote-tracking branch 'origin/master' into partial-instancer 2019-05-15 13:09:19 -04:00
Cosimo Lupo
80a4993edc
appveyor: update virtualenv to fix failing py27 tests
https://ci.appveyor.com/project/fonttools/fonttools/builds/24501794/job/tx8rqwy24ract5s8
2019-05-13 13:43:28 +01:00
Cosimo Lupo
9208db110c
Bump version: 3.41.2 → 3.41.3.dev0 2019-05-13 13:29:19 +01:00
Cosimo Lupo
70357530ff
Release 3.41.2 2019-05-13 13:29:18 +01:00
Cosimo Lupo
650e3617d3
Update changelog [ci skip] 2019-05-13 13:29:06 +01:00
Cosimo Lupo
3270c304c8
Merge pull request #1609 from anthrotype/varlib-cff-post-2
varLib: keep CFF2 glyph names in post format2 table
2019-05-13 13:23:13 +01:00
Cosimo Lupo
8e8d628852
Update changelog [ci skip] 2019-05-13 13:16:18 +01:00
Cosimo Lupo
6b297076a4
varLib_test: update test TTX so they keep glyph names 2019-05-13 13:12:46 +01:00
Cosimo Lupo
71574fa100
varLib: keep CFF2 glyph names in post format2 table 2019-05-13 13:10:57 +01:00
Cosimo Lupo
96c81ebd8a
Merge pull request #1598 from fonttools/update-OTF-testfonts
Convert OTF font files in test data to ttx files.
2019-05-13 13:09:37 +01:00
Cosimo Lupo
9e369fa86f
remove unused method in specializer_test and debug prints 2019-05-13 13:00:24 +01:00
Cosimo Lupo
1fd331b351
Bump version: 3.41.1 → 3.41.2.dev0 2019-05-13 10:22:35 +01:00
Cosimo Lupo
e529b13f0a
Release 3.41.1 2019-05-13 10:22:34 +01:00
Cosimo Lupo
2a820a2d16
Update changelog 2019-05-13 10:20:07 +01:00
Cosimo Lupo
4872c02b32
Merge pull request #1601 from fonttools/pyup-scheduled-update-2019-05-06
Scheduled weekly dependency update for week 18
2019-05-13 10:08:16 +01:00
Cosimo Lupo
df4eb568de
Merge pull request #1606 from anthrotype/dslib-load-source-fonts
designspaceLib: add loadSourceFonts method with custom opener
2019-05-11 10:33:37 +01:00
Cosimo Lupo
175399ecbc
designspaceLib: add examples to loadSourceFonts docstring 2019-05-10 18:43:42 +01:00
Cosimo Lupo
338793d055
varLib: use DesignSpaceDocument.loadSourceFonts method to load masters
we still need to check if source have 'layerName' set before loading from path
since that attribute only makes sense for UFOs, not TTFonts.
2019-05-10 16:34:18 +01:00
Cosimo Lupo
44f74dc8bb
designspaceLib: add loadSourceFonts method with custom opener
Allows to load the SourceDescriptor.font attribute from its path, using a custom callable (e.g. defcon.Font or ttLib.TTFont, etc.).
2019-05-10 16:32:11 +01:00
Cosimo Lupo
fb6eba96f6
Merge pull request #1603 from anthrotype/partial-instantiate-name
instancer: prune unused name records and set glyf 'overlap' flags
2019-05-09 16:39:45 +01:00
Cosimo Lupo
b5da46425c
instancer: rename --no-overlap to --no-overlap-flag
as suggested by Laurence
https://github.com/fonttools/fonttools/pull/1603#commitcomment-33462372
2019-05-09 16:39:26 +01:00
Cosimo Lupo
85c3f85526
Merge pull request #1605 from editkid/fix/ttlib-bbox-rounding
Fix: ttLib _h_e_a_d FontBBox rounding
2019-05-09 13:56:32 +01:00
editkid
9f4fcfeee5 Improve README text wrap 2019-05-09 23:27:32 +12:00
editkid
7f145be901 Add name to README 2019-05-09 23:18:51 +12:00
editkid
742ed88b07 Apply intRect to FontBBox to prevent type error 2019-05-09 23:13:15 +12:00
Cosimo Lupo
d9ad9d8ef5
instancer: set OS/2 weight/width and post.italicAngle 2019-05-08 18:46:43 +01:00
Cosimo Lupo
2d99beb0da
instancer: distinguish full/partial instance in log and outfile
and call argparse parser.error() instead of letting ValueError propagate
when parsing CLI options in parseArgs
2019-05-08 17:23:24 +01:00
Cosimo Lupo
178840dcf9
instancer: add --no-overlap to CLI options 2019-05-08 17:23:24 +01:00
Cosimo Lupo
5871a754de
instancer: set mac overlap glyf flags when fully instancing
like varLib.mutator does
2019-05-08 17:23:24 +01:00
Cosimo Lupo
5a530880c0
instancer: prune unused name records after instancing 2019-05-08 11:38:38 +01:00
Cosimo Lupo
0010a3cd9a
instancer: return default deltas as floats from instantiateTupleVariationStore
Do not round them to integer, but let the caller do the rounding immediately before adding them to the default instance (or just before compiling the binary table as with glyf).

This ensures that the glyphs' left sidebearings are calculated in the same way as they were by varLib.mutator.
If we round deltas too early, then we may get off-by-one differences.
See the glyf table setCoordinates method where left sidebearings are computed.
2019-05-07 14:05:27 +01:00
pyup-bot
c2b34737be Update fs from 2.4.4 to 2.4.5 2019-05-06 16:33:06 +01:00
Cosimo Lupo
1041cf90ef
_g_l_y_f: don't return component flags in getCoordinatesAndControls
varLib._GetCoordinates (which this method is copied from) did not return such data either.

The problem with also including component flags in the returned controls
tuple is that different masters may happen to have different component
flags (e.g. if one master has USE_MY_METRICS, another doesn't).
2019-05-03 18:59:32 +01:00
Cosimo Lupo
82662e31f0
Merge pull request #1596 from anthrotype/partial-instantiate-avar
[instancer] partially instantiate avar, STAT and fvar
2019-05-03 13:38:26 +01:00
Cosimo Lupo
89ce41be55
instancer_test: add test for instantiateSTAT
added a dummy STAT table to PartialInstancer-VF.ttx font that has all 4 AxisValue formats.
It doesn't have contain AxisValue for each fvar NamedInstance like the spec recommends, but it's ok for the sake of this test
2019-05-03 13:32:06 +01:00
Cosimo Lupo
3bfff09c8c
instancer: remap STAT AxisValue.AxisIndex
if STAT table contains no DesignAxisRecord, then keep it empty and skip.
2019-05-03 13:29:43 +01:00
Cosimo Lupo
ffc98baa0f
Merge pull request #1600 from silnrsi/bugfix1
Minor fixlet for Sill table
2019-05-03 10:34:08 +01:00
Martin Hosken
ad60ce80a9 Minor fixlet for Sill table 2019-05-03 16:27:13 +07:00
Khaled Hosny
dadec23978
Merge pull request #1599 from khaledhosny/fealib-valuerecord-asfea
[feaLib] don’t write None in ast.ValueRecord.asFea()
2019-05-03 11:20:33 +02:00
Khaled Hosny
887ea22a34
Merge pull request #1594 from fonttools/fix-subsetter-cff2-issue
Fix bug in subsetting T2 CharStrings from CFF font, issue 1590
2019-05-03 01:34:53 +02:00
Khaled Hosny
b1999a1a0e Add test for previous commit 2019-05-03 01:14:09 +02:00