6186 Commits

Author SHA1 Message Date
Cosimo Lupo
638ed05d85
setup.py: add matplotlib to 'plot' extra, used by varLib.plot 2018-10-26 11:05:58 +01:00
Behdad Esfahbod
7ee81c8821 [varLib] Take total bounding box into account when resolving model
Umm. Not sure how useful this is, but helps with cases where there
were not masters on extremes and people expected this to work.
Happens in Higher-Order Interpolation since the axis extremes
are not interesting.

Fixes https://github.com/googlei18n/fontmake/issues/473

Test case (in case someone wants to add it to test suite!):

Before:
$ ./fonttools varLib.models 0,0 .5,0 0,.5 .5,.5 1,1
Sorted locations:
[{}, {'A': 0.5}, {'B': 0.5}, {'A': 0.5, 'B': 0.5}, {'A': 1.0, 'B': 1.0}]
Supports:
[{},
 {'A': (0, 0.5, 0.5)},
 {'B': (0, 0.5, 0.5)},
 {'A': (0, 0.5, 0.5), 'B': (0, 0.5, 0.5)},
 {'A': (0.5, 1.0, 1.0), 'B': (0, 1.0, 1.0)}]

After:
$ ./fonttools varLib.models 0,0 .5,0 0,.5 .5,.5 1,1
Sorted locations:
[{}, {'A': 0.5}, {'B': 0.5}, {'A': 0.5, 'B': 0.5}, {'A': 1.0, 'B': 1.0}]
Supports:
[{},
 {'A': (0, 0.5, 1.0)},
 {'B': (0, 0.5, 1.0)},
 {'A': (0, 0.5, 1.0), 'B': (0, 0.5, 1.0)},
 {'A': (0.5, 1.0, 1.0), 'B': (0, 1.0, 1.0)}]
2018-10-25 19:46:44 -07:00
Cosimo Lupo
10e10a2c82
Merge pull request #1344 from anthrotype/ufo-reader-and-writer
make UFOWriter a subclass of UFOReader, use mixins for shared methods
2018-10-25 17:12:27 +01:00
Cosimo Lupo
78f572294f
Revert "UFOReader: have readInfo return a dict"
This reverts commit 440c71345a88f32ccad06d662fb30272f9253f07.
2018-10-25 16:55:59 +01:00
Cosimo Lupo
440c71345a
UFOReader: have readInfo return a dict
but keep current behavior whereby caller can pass an Info object.
The readInfo method was the only one that takes an output argument,
all the others just return some raw data.
I like to fully construct my classes in their __init__ method.
E.g. Info(**reader.readInfo())
2018-10-25 15:36:08 +01:00
Cosimo Lupo
9adb0226de
Merge pull request #1347 from MrBrezina/master
Fix normalization error when condition’s minimum/maximum are missing in designspace, update test too
2018-10-24 18:21:25 +01:00
David Březina
7e33c427db Better test for none-ness 2018-10-24 19:08:11 +02: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
59d9abf5f3
UFOReader: getFileModificationTime should be without leading underscore
that's what it's currently in UFOReader. The UFOWriter and GlyphSet will gain that one for free.
2018-10-24 17:43:47 +01:00
Cosimo Lupo
46ffe7ef42
reuse __enter__, __exit__ and close methods from UFOReader superclass 2018-10-24 14:14:37 +01:00
Cosimo Lupo
8cc613fda3
ufoLib: remove stray print()
I forgot this in a previous commit
2018-10-24 12:37:37 +01:00
Cosimo Lupo
7f3bf46096
ufoLib: use a single (abstract) base class for sharing methods between UFOReader, UFOWriter and GlyphSet 2018-10-23 20:41:35 +01:00
Cosimo Lupo
0a9e1e56ef
ufoLib: Add UFOReaderWriter alias of UFOWriter 2018-10-23 20:40:53 +01:00
Cosimo Lupo
3167e31be8
ufoLib: also reuse _readLayerContents method
plus fix some redundant 2to3 left-overs
2018-10-23 20:30:52 +01:00
Cosimo Lupo
f997005fb7
make UFOWriter a subclass of UFOReader, use mixins for shared methods 2018-10-23 19:43:37 +01:00
Cosimo Lupo
1a14b38de2
UFOWriter: normalize path by removing trailing slashes
or else os.path.dirname(Font.ufo/) would think that the directory doesn't exist...
2018-10-23 19:10:39 +01:00
Cosimo Lupo
80b033b76e
Merge pull request #1343 from fonttools/pyup-initial-update
Initial Update
2018-10-23 16:29:22 +01:00
Cosimo Lupo
a53bc4eb9f
Merge pull request #1342 from fonttools/pyup-config
Config file for pyup.io
2018-10-23 16:29:02 +01:00
pyup-bot
743ecc8387 Update brotli from 1.0.1 to 1.0.7 2018-10-23 16:17:22 +01:00
pyup-bot
979927bef3 create pyup.io config file 2018-10-23 16:17:18 +01:00
Cosimo Lupo
e2478f8911
setup.cfg: add ALLOW_UNICODE and ELLIPSIS to pytest's 'doctest_optionflags' 2018-10-22 11:20:24 +01:00
Cosimo Lupo
edd01b3fa0
Bump version: 3.31.0 → 3.31.1.dev0 2018-10-21 19:09:09 +01:00
Cosimo Lupo
3230dec69b
Release 3.31.0 2018-10-21 19:05:10 +01:00
Cosimo Lupo
77c3e0ce7d
typo [skip ci] 2018-10-21 19:04:18 +01:00
Cosimo Lupo
f111666f9f
Update changelog [skip ci] 2018-10-21 19:03:04 +01:00
Cosimo Lupo
c1a327514a
README: normalize list indentation [skip ci] 2018-10-21 18:35:54 +01:00
Cosimo Lupo
b96922aeff
typo [skip ci] 2018-10-21 18:28:53 +01:00
Cosimo Lupo
32f8735aa5
README: mention extras and ufoLib dependencies 2018-10-21 18:26:26 +01:00
Cosimo Lupo
fe4381df56
ufoLib: add readData, writeData and removeData methods 2018-10-21 15:42:02 +01:00
Ben Kiel
96ca09c39e
Merge pull request #1340 from benkiel/ufoLib_creator
Change UFOLib creator
2018-10-19 11:44:58 -05:00
Ben Kiel
8bb9d0ed6c Change UFOLib creator 2018-10-19 11:25:52 -05:00
Cosimo Lupo
13cf8ef1ab
Merge pull request #1335 from anthrotype/fonttools-ufolib
merge ufoLib into fontTools.ufoLib
2018-10-19 14:28:20 +01: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
6a7493adbb
designspaceLib: port to using lxml via fontTools.misc.etree
indentation is now two spaces like lxml (unchangeable) default
https://github.com/fonttools/fonttools/pull/1335#issuecomment-431112494
2018-10-18 20:03:54 +01:00
Cosimo Lupo
9e85f3bcc3
svgLib: use fontTools.misc.etree 2018-10-18 19:50:26 +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
9557c6a229
fix deprecation warnings when using ABC from collections module 2018-10-18 18:12:43 +01:00
Cosimo Lupo
4be92cc6da
README: minor [skip ci]
In b1093c8a I removed py36 from the default tox envlist.
I kept only py27 and py37.
This doesn't mean one can't run tests against py36 as well.
Just that running tox without args, or without setting TOXENV variable
will run py27 and py37 by default
2018-10-18 16:39:06 +01:00
Cosimo Lupo
e871b2f41d
pointPen: add missing classes to __all__ 2018-10-18 16:12:58 +01:00
Cosimo Lupo
6b1bf4247b
move pointPen to fontTools.pens subpackage; keep ufoLib.pointPen alias 2018-10-18 16:03:09 +01:00
Cosimo Lupo
a869f56a5f
.travis/run.sh: re-run the xml-related tests also without lxml 2018-10-18 15:47:42 +01:00
Cosimo Lupo
88b6688fbd
tox: remove unnecessary 'nocov' factor
tox now allows to use exclamation mark to negate an environment factor.
2018-10-18 15:40:32 +01:00
Cosimo Lupo
b1093c8ac1
tox: add extras; allow to test with/without lxml
calling 'tox -e py37-cov-nolxml' will run tests without lxml,
using built-in ElementTree library
2018-10-18 15:40:32 +01:00
Cosimo Lupo
b23a208805
ufoLib: fix doctests failing on py27 for unicode_literals
I hate doctests.
2018-10-18 15:40:32 +01:00
Cosimo Lupo
8ba98afb92
etree: remove 'XMLTreeBuilder' from __all__
only present in py27 elementtree:
6e57382464/Lib/xml/etree/ElementTree.py (L1676-L1677)
2018-10-18 15:40:32 +01:00
Cosimo Lupo
d7cc75bb04
requirements.txt: use scipy on cpython, munkres on pypy 2018-10-18 15:40:32 +01:00
Cosimo Lupo
f9f7363fc0
setup.cfg: mute some warnings from pytest log
https://github.com/fonttools/fonttools/issues/868
2018-10-18 15:40:32 +01:00
Cosimo Lupo
eb08cc0fbe
setup.py: remove pytest-runner; require pytest to run tests
python setup.py test no longer works. The 'tests_require' keyword in setup()
is no longer supported by setuptools.
We use tox to bootstrap the test environment, so we don't need that
2018-10-18 15:40:07 +01:00