4787 Commits

Author SHA1 Message Date
Cosimo Lupo
7f82d11156
otlLib: return namedtuple from _makeDeviceTuple
makes code slightly more readable.
2019-06-18 16:00:39 +01:00
Cosimo Lupo
8c90878fcf
Merge remote-tracking branch 'origin/master' into fix-singlepos-merge 2019-06-18 15:38:10 +01:00
Cosimo Lupo
987798f82e
Update Blocks, Scripts and ScriptExtensions to latest Unicode Data 12.1 2019-06-18 11:33:53 +01:00
Cosimo Lupo
eda353c4c1
Merge pull request #1642 from fonttools/CFF2-fixes
Fixes merge bug when VF source have no blends or no marking glyphs in any charstrings.
2019-06-17 16:57:16 +01:00
Cosimo Lupo
00e054336f
Merge pull request #1639 from anthrotype/woff2-untransformed
[woff2] support hmtx transform + glyf/loca without transformation
2019-06-17 16:09:02 +01:00
Cosimo Lupo
a96d2dba73
woff2: add main() to call 'compress' and 'decompress' subcommands
$ fonttools ttLib.woff2 --help
2019-06-14 18:18:21 +01:00
Cosimo Lupo
c2ec989fcc
Merge pull request #1638 from madig/varLib-merge-kerning-correctly
varLib: Fix merging of class kerning tables
2019-06-14 16:26:07 +01:00
Cosimo Lupo
fc6ea56568
must add comma to make parentheses into a tuple 2019-06-14 16:20:48 +01:00
Cosimo Lupo
c6cf9bbb35
minor typo fix 2019-06-14 16:19:54 +01:00
Cosimo Lupo
3ab7dd143d
minor whitespace 2019-06-14 16:19:29 +01:00
Cosimo Lupo
6777145f5b
Merge pull request #1644 from fonttools/Fix-CFF2-PrivateDict_bug
[varLib.cff] Fix important bug in merging CFF2 PrivateDicts.
2019-06-14 16:18:12 +01:00
Cosimo Lupo
160a9cb238
fix doctest calling configLogger causing flakiness of other tests
since we use pytest-randomly to randomize the test execution, depending on when
this specific test is executed, it may have the side effect of configuring
the global logging configuration, causing other tests that capture logging
messages to fail.

E.g. see https://travis-ci.org/fonttools/fonttools/jobs/545680550
2019-06-14 11:50:07 +01:00
Nikolaus Waxweiler
f48051af23 Fix corrupt class-based pair kerning table merging 2019-06-14 10:05:48 +01:00
Cosimo Lupo
deaeb909a7
woff2: add support for hmtx transformation
no tests yet

fixup
2019-06-13 18:07:14 +01:00
ReadRoberts
cc3c928053 [varLib.cff] Fix important bug in merging FF2 PrivateDicts.
There was a bug that caused the PrivateDict of the first region to be used for all others.
2019-06-12 17:11:01 -07:00
ReadRoberts
ec54541e30 [varLib.cff] Fix merging bug when there are no blends or marking glyphs.
If the CFF2 VF has no blends, or no marking glyphs, the default variation table does not get built; this can be needed later for the PrivateDict.
2019-06-12 16:31:29 -07:00
ReadRoberts
b44c761526 [oltLib.builder] Fix bug in building a variation font.
The logic for building a Device subtable didn't know about the VariationIndex flavor of a ValueRecord Device subtable.
2019-06-12 14:31:38 -07:00
ReadRoberts
b756bcac18 [varLib.merger] Fix merging GPOS SinglePos subtables
When a SinglePost lookup is compiled, pretty much all compilers do some compression by combining similar ValueRecords into a single subtable. This compression produces different lengths of the list of subtables between source fonts. The original code required that all SinglePos lookups have the same subtables, often doesn't work.

I fixed this in varLib.merger.py by first flattening a SinglePos lookup to a single subtable, using the same record format for all records, and then merging the source fonts. After the merge is complete, I call fontTools.otlLib.builder.buildSinglePos() to rebuild the lookup subtables.
2019-06-12 14:30:30 -07:00
Cosimo Lupo
0162446f4c
woff2: don't normalize glyf+loca if we aren't transforming them
Also, the TTFont.getGlyphOrder() automatically makes up a dummy
glyph order from the maxp.numGlyphs, we simply need to ensure
'maxp' is decompiled before 'glyf'.

When transforming glyf, the glyf.glyphOrder is guaranteed to
be present (as the glyf table has been already decompiled), so
we don't need to deal with it being missing or incorrect
(hence removed spurious tests).
2019-06-12 18:41:13 +01:00
Cosimo Lupo
c98b71af5c
woff2: add support for unstransformed glyf and loca tables
Fixes https://github.com/fonttools/fonttools/issues/1636
2019-06-11 15:12:27 +01:00
Cosimo Lupo
1fc1d2f529
[loggingTools] remove unused backport of LastResortLogger
we are not in the business of logging.
2019-06-11 13:39:59 +01: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
Cosimo Lupo
aa8a5bc616
featureVars: avoid duplicate refs to 'rvrn' feature in default langsys
the buildGSUB function creates an empty GSUB with no FeatureRecords, so the
FeatureIndex list should be empty initially; the index of the newly created
rvrn feature record will be appended later on by addFeatureVariationsRaw
function.
2019-05-29 13:40:57 +01:00
Cosimo Lupo
bec188c816
Bump version: 3.42.0 → 3.42.1.dev0 2019-05-28 12:07:55 +01:00
Cosimo Lupo
a0b8ff8b35
Release 3.42.0 2019-05-28 12:07:54 +01:00
Cosimo Lupo
89f42079b6
Merge pull request #1619 from schriftgestalt/tsType-type
fix sign of fsType
2019-05-28 03:38:20 -04: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
Behdad Esfahbod
2ac470b96b Ouch, fix indentation
My bad.  Really sorry.
2019-05-25 17:18:35 -04:00
Behdad Esfahbod
0442d9062a Improve allEqual 2019-05-25 16:12:24 -04:00
Miguel Sousa
9fb0cac564 fontBuilder: Don't add a stub signature to DSIG
An empty DSIG is enough to make MS applications happy and also fixes an error reported by MS Font Validator
2019-05-25 10:09:13 -07:00
schriftgestalt
47f8d06d9a fix sign of fsType 2019-05-23 17:40:01 +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
6052357f14 [varLib] Command-line options to configure logging 2019-05-18 01:57:57 +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
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
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
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
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
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
editkid
742ed88b07 Apply intRect to FontBBox to prevent type error 2019-05-09 23:13:15 +12: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