618 Commits

Author SHA1 Message Date
ReadRoberts
a460eee80b varLib. Add support for building CFF2 variable font
Fix syntax error reported by build system: can't mix string string types when doing literal concatenation

Fix local import reference - doesn't work in Python3.

Addressed issues raised by @msousa for PR 1345 yesterday.

Will change cff2_merge_funcs.py and cff2mergePen.py from tab to space indentations after the current comments are resolved.

Add various improvements from comments:
- do not edit the post table under varLib.build(). Setting post table format 2 or 3 is now expected to be managed by whatever calls varLib.build().
- In the t2CharStringPen module, rename closure _round() nested in makeRoundFunc to an exportable function, and use it in cff2mergePen.
- remove TypeSupply copyright from cff2mergePen.
- use modulo function to convert float to int when it is meant to be 0 in cff2mergePen.

cff2_merge_funcs.py:merge_PrivateDicts() should only be blending the hint related fields in the PrivateDict. This oversight that was surfaced by @madig reporting an error building his Cantrell font. The bug appeared when the font was subroutinized, as the pen draw method then has to interpret the Subr field in order to access T2Charstring subroutines.

Fix expected ttx output file. When I removed the logic to add glyph names to the post table, glyph names in the ttx file changed.

Miguel prefers a simple list for readability in cff2_merge_funs.py:138.
2018-11-12 11:38:18 -08:00
ReadRoberts
9de373455a varLib. Add support for building CFF2 variable font with a call to varLib.build().
Add test for building CFF2 variable font with a call to varLib.build().

The 'dollar' glyph in the test font is deliberately slightly malformed, with flat curves, in order to exercise the code for dealing with some of the differences in masters designs that can arise from T2 charstring optimization.
2018-11-12 11:38:12 -08:00
Behdad Esfahbod
16aa66c384 [varLib.featureVars] Update test expectation 2018-11-10 15:24:11 -05:00
justvanrossum
29cc726363 fix test expected data 2018-11-10 15:07:18 -05:00
Behdad Esfahbod
f6bfc4139d [varLib.featureVars] Add quadratic test
We get the optimal solution.
2018-11-09 18:59:28 -05:00
Behdad Esfahbod
8005d43146 [varLib.featureVars] Enable test now that it passes 2018-11-09 16:04:21 -05:00
Behdad Esfahbod
5a34805d05 [varLib.featureVars] Improve test 2018-11-09 11:55:11 -05:00
Behdad Esfahbod
133607f4b1 [varLib.featureVars] Add test 2018-11-09 11:47:49 -05:00
justvanrossum
fffd7e4b67 fixed test failure after merging #1357 2018-11-02 12:32:50 +01:00
justvanrossum
3b7ac3dd78 Merge branch 'master' into addmultilingualnames-mac 2018-11-02 12:30:24 +01:00
justvanrossum
0d06fd23ce fix test failure in addMultilingualName() test by setting mac to None, which makes it behave like before 2018-11-02 12:12:57 +01:00
justvanrossum
cc540c41e9 oops, removed leftover debug turd 2018-11-02 11:59:07 +01:00
justvanrossum
8841d98652 [name] make addMultilingualName() also add Mac names by default. 2018-11-02 11:56:22 +01:00
justvanrossum
0bfee639c6 test named instances 2018-11-02 08:02:56 +01:00
justvanrossum
6e299a1bd5 set reasonable values for ascent and descent, test toy variation font 2018-11-01 21:33:08 +01:00
justvanrossum
beaf0432a9 added many docstrings, and added setupHorizontalMetrics and setupVerticalMetrics methods to replace setupMetrics 2018-11-01 20:30:21 +01:00
justvanrossum
25f29841b7 rename setupDSIG to setupDummyDSIG and added a doc string to clarify the legacy status of this 2018-11-01 13:19:27 +01:00
justvanrossum
d10dc87527 test DSIG 2018-11-01 12:13:47 +01:00
justvanrossum
cabce338c7 calculate glyph bounds implicitly (unless asked not to do that) 2018-11-01 10:17:07 +01:00
justvanrossum
cfd00ef3dd don't need to specify keepGlyphNames, esp. if it matches defsult behavior 2018-11-01 09:57:35 +01:00
justvanrossum
19eac2e00a test localized name table entries 2018-11-01 09:55:27 +01:00
justvanrossum
a442ce627d work towards making name strings localizable 2018-11-01 09:52:06 +01:00
justvanrossum
53d743f427 adjust expected test output: we no longer output mac names 2018-11-01 09:41:58 +01:00
justvanrossum
0ae6b7f777 workaround path object issue on py 2.7 2018-10-31 21:09:27 +01:00
justvanrossum
96cdf116ee initial commit, with rudimentary tests 2018-10-31 20:54:34 +01:00
justvanrossum
7bcb67f0cc avoid %r to eliminate unicode repr problems in the tests 2018-10-29 20:47:17 +01:00
justvanrossum
c9d4b65fd4 add some component tests 2018-10-29 19:54:52 +01:00
justvanrossum
b5b8a776fe one more identifier test 2018-10-29 19:45:06 +01:00
justvanrossum
25f3dbfb85 test identifier kwarg behavior 2018-10-29 19:43:27 +01:00
justvanrossum
f8ff962490 added some point pen tests 2018-10-29 19:37:50 +01:00
David Březina
28245afe1e Fix normalization error when condition’s minimum/maximum are missing in designspace, update test too
Fixes #1346
2018-10-24 18:46:45 +02:00
Cosimo Lupo
931f8024eb
designspace_test: must use plistlib.Data for py2 compatibility
grr...
2018-10-18 20:10:59 +01:00
Cosimo Lupo
97d5044109
designspaceLib_test: fixup expected test results 2018-10-18 20:04:27 +01:00
Cosimo Lupo
8081bf57fa
etree/plistlib/glifLib: using (default) single quotes in XML_DECLARATION
https://github.com/fonttools/fonttools/pull/1335#issuecomment-431118568
2018-10-18 19:49:52 +01:00
Cosimo Lupo
6db88d7cb7
remove deprecated fontTools.varLib.designspace 2018-10-18 18:40:54 +01:00
Cosimo Lupo
081b0fc090
keep fontTools.ufoLib.plistlib compatibility shim
the old readPlist, writePlist are only kept in fontTools.ufoLib.plistlib,
not in fontTools.misc.plistlib
2018-10-18 11:11:34 +01:00
Cosimo Lupo
2cc1f418c7
rename Tests/ufoLib/test_*.py to Tests/ufoLib/*_test.py
for constency with the rest of fontTools tests.
Also, in setup.cfg we tell pytest to only search for modules named like these
2018-10-17 17:50:06 +01:00
Cosimo Lupo
0cef799a08
move test_{etree,plistlib}.py to misc/{etree,plistlib}_test.py 2018-10-17 17:46:37 +01:00
Cosimo Lupo
176b5f763d
change 'import ufoLib' to 'import fontTools.ufoLib' 2018-10-17 17:43:28 +01:00
Cosimo Lupo
1f7155c432
Merge branch 'fold-into-fontTools' into fonttools-ufolib 2018-10-17 17:21:44 +01:00
Cosimo Lupo
ee94843cdd
move tests to Tests/ufoLib 2018-10-17 17:06:12 +01:00
Mickaël Schoentgen
52e855e4a4 Use the 'with' context manager when dealing with files 2018-10-01 08:42:45 +02:00
Sascha Brawer
2011ccf6ec [morx] Clean up compilation of AAT action tables; add more tests 2018-09-24 20:15:54 +02:00
Sascha Brawer
4a1871ff62 [morx] Support AAT action type to insert glyphs 2018-09-24 18:14:01 +02:00
Khaled Hosny
baf4f560bb [feaLib] Skip noop class PairPos subtables
If Coverage is None then the subtable is a noop that does nothing and
there is no point in building it. As a bonus, it makes OTS happy since
it will reject subtables where coverageOffset is NULL (0) and the spec
does not say whether this is allowed or not.
2018-09-16 12:23:34 +02:00
Cosimo Lupo
9536541aba
feaLib: demote warning about redefined kern pairs to debug message
https://github.com/fonttools/fonttools/issues/1147#issuecomment-421539956
2018-09-15 10:09:49 +02:00
Cosimo Lupo
0431360cf2
Merge pull request #1314 from anthrotype/varlib-feature-variations
[varLib] implement building GSUB FeatureVariations from DesignSpace rules
2018-09-14 17:25:44 +02:00
Cosimo Lupo
af8c461c92
varLib_test: add test case for GSUB FeatureVariations 2018-09-14 16:51:25 +02:00
Jens Kutilek
7c8077a63d Add glyf flags bit6 to ttx output (#1316)
* Implement glyf outline flags bit 6 when decompiling/compiling

* Add test data for outline flag bit 6

* Rename flags, use bitwise OR for setting flag bit

* Remove unneeded code
2018-09-14 15:27:32 +02:00
Cosimo Lupo
ac9790ca89
travis: 'brew install python' on macOS, use generic py3 tox env
formula is now named just 'python'.
For the homebrew version installed on Travis (which we don't
autoupdate) we *should* get python3.6 with this currently.

It might be the case that python3 is already installed on
Travis macOS image, but need to check.

We call tox with 'TOXENV=py3' so that when Travis updates its homebrew,
we'll get python3.7 automatically.

Finally, use virtualenv instead of venv on mac to fix tox bootstrapping issue

https://github.com/pypa/virtualenv/issues/1051
https://github.com/pre-commit/pre-commit/issues/631
https://travis-ci.org/fonttools/fonttools/jobs/427582922#L214

fixup
2018-09-12 12:09:43 +02:00