Cosimo Lupo
3f6a381132
woff2_test: add tests for main() console entry point
2019-06-14 18:30:32 +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
a45af5d8db
minor: typos in comments [skip ci]
2019-06-14 16:06:04 +01:00
Cosimo Lupo
720b266e89
instancer: minor: skip add cvar delta if None or 0
2019-06-14 15:41:33 +01:00
Cosimo Lupo
952fe9b059
instancer: refactor _instantiateFeatureVariations to avoid too deep nesting
...
https://github.com/fonttools/fonttools/pull/1628#discussion_r292600019
2019-06-14 14:37:39 +01:00
Cosimo Lupo
29daa994f0
instancer: add docstring for 'instantiateTupleVariationStore'
2019-06-14 12:51:31 +01:00
Cosimo Lupo
754c3c2381
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-06-14 11:50:20 +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
Cosimo Lupo
11bfc6856d
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-06-14 11:31:30 +01:00
Cosimo Lupo
1345ae8693
instancer: don't define self in terms of mutator, just say what it is
2019-06-14 11:24:33 +01:00
Cosimo Lupo
65b0609be1
remove redundant table__g_l_y_f.getCoordinates method
...
just use getCoordinatesAndControls
2019-06-14 11:17:37 +01:00
Cosimo Lupo
751c181f2d
instancer: remove comment about module being 'experimental'
2019-06-14 11:09:48 +01:00
Cosimo Lupo
18efee2c7b
TupleVariation: rename get{DeltaType,CoordWidth}; do not special-case scalar=0
...
we still need to branch between the case where coordinates are wrapped in (x, y) tuples or naked floats.
2019-06-14 11:03:38 +01:00
Nikolaus Waxweiler
2d72648f62
Add NEWS entry [ci skip]
2019-06-14 10:05:48 +01:00
Nikolaus Waxweiler
f48051af23
Fix corrupt class-based pair kerning table merging
2019-06-14 10:05:48 +01:00
Nikolaus Waxweiler
bcb0761202
Add test
2019-06-14 10:05:48 +01:00
Cosimo Lupo
8bd83f36bd
woff2_test: add tests for transformed hmtx and untransformed glyf+loca
2019-06-13 18:46:46 +01:00
Cosimo Lupo
ba41877d10
Snippets/woff2_compress: add --hmtx-trasform option; use argparse
2019-06-13 18:07:14 +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
dce80efc7c
[varLib.cff] Add test case for CFF2 variable font with no markiing glyphs.
2019-06-12 16:45:08 -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
73501eda46
[varLib.merger] Add test data for merging GPOS SinglePos subtables
2019-06-12 14:32:25 -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
6b0e350a06
woff2_test: remove test for no longer reserved bits 6-7
2019-06-11 15:23:58 +01:00
Cosimo Lupo
5d7e750b69
Snippets/woff2_compress: add --disable-transforms option
2019-06-11 15:13:09 +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
Cosimo Lupo
ab9472d3ab
tox.ini: use pytest-randomly to randomize test execution
...
https://github.com/pytest-dev/pytest-randomly
2019-06-11 13:25:27 +01:00
Cosimo Lupo
9af92fdb41
woff2_test: fix up flaky tests
...
some tests were failing when shuffling the order of the tests with
pytest-randomly. That's because calling TTFont.getTableData method
on 'loca' table before having compiled 'glyf' returns an empty b""
string.
2019-06-11 13:22:38 +01:00
Cosimo Lupo
6ea99e4569
feaLib/builder_test: use CapturingLogHandler instead of assertLogs
2019-06-11 13:14:47 +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
97405ddb35
instancer: also update sidebearings+bbox of glyphs with no variations
...
Previously we were calling glyf.setCoordinates method only when a glyph had some
variation deltas to be applied to the default glyf coordinates.
However, some composite glyph may contain no variation delta but their base glyphs
may change, thus we still need to update the sidebearings and bounding box of the
composite glyphs.
2019-06-06 13:38:11 +01:00
Cosimo Lupo
9d895be4d5
instancer_test: add test for composite glyph without variations
...
We assert that the composite glyph's sidebearings and bbox are updated when its parent glyph
has changed.
The tests will fail, but a fix will follow shortly.
2019-06-06 13:33:57 +01:00
Cosimo Lupo
1722f99182
PartialInstancer-VF.ttx: add composite glyph and vhea table
...
the glyph 'minus' references 'hyphen' as component, but doesn't have any deltas in gvar.
vhea table is required when vmtx is present.
2019-06-06 13:30:21 +01:00
Cosimo Lupo
ff473515a2
g_l_y_f: use '==' instead of 'is' for comparing equality with int literals
2019-06-04 16:16:31 +01:00
Cosimo Lupo
0abf6a8295
instancer_test: always dump test ttx files with '\n'
2019-05-31 20:08:50 +01:00
Cosimo Lupo
11b73034d7
instancer_test: read expected test file with unix newlines '\n'
...
or windows isn't happy..
2019-05-31 20:03:52 +01:00
Cosimo Lupo
8c3bfe5475
ttx: use caplog fixture instead of capsys
...
this capture logging messages whereas capsys captures stdout/stderr
2019-05-31 19:58:02 +01:00
Cosimo Lupo
499d97464d
instancer_test: use caplog fixture
2019-05-31 19:57:53 +01:00
Cosimo Lupo
3d5f5c0a36
Tests/conftest.py: disable fontTools.configLogger globally during tests
...
otherwise it causes sides effects since logging state is global and should only
be done when __name__ == '__main__'.
We can capture logging messages via the caplog pytest fixture
2019-05-31 19:57:52 +01:00
Cosimo Lupo
1febf7f5a2
minor formatting
2019-05-31 12:37:31 +01:00
Cosimo Lupo
06ad903ef1
instancer: rename locals from snake_case to camelCase for consistency
...
the rest of the instancer module uses camelCase, no point in having both styles within the same module
2019-05-31 12:26:03 +01:00