Behdad Esfahbod
cada4607fb
[varLib] Use "VF" (for variable-font" instead of "GX" in output name
2016-12-08 20:48:08 -08:00
Behdad Esfahbod
06de8ce818
[STAT] It was decided to NOT bump minor version...
...
...since no one implements STAT so far. So, version stays at 1.0.
2016-12-07 18:11:50 -08:00
Cosimo Lupo
162cf8936a
Bump version: 3.2.3 → 3.3.0
2016-12-06 15:44:58 +00:00
Cosimo Lupo
3ab01515a5
Remove top-level sstruct and xmlWriter aliases
...
You should use the sstruct and xmlWriter modules that are in fontTools.misc.
Fixes #696
2016-12-06 11:16:17 +00:00
Behdad Esfahbod
9ca34a08ec
[STAT] Update for version 1.1; hasn't made it into spec yet!
2016-12-04 21:22:47 -08:00
Cosimo Lupo
b424722ad1
Merge pull request #744 from fonttools/fix-for-issue-740
...
Fix for #740 .
2016-12-04 13:16:48 +00:00
Cosimo Lupo
f59c3c59ed
Merge pull request #757 from anthrotype/fix-round3-None
...
[py23] fix inconsistency of built-in round on Python 3.5 if second argument is None
2016-12-04 10:56:08 +00:00
Sascha Brawer
0de6e8d4ff
Update table list for STAT table
2016-12-02 19:14:32 -08:00
Sascha Brawer
e32762024c
[STAT] Fix unit tests
2016-12-02 19:12:26 -08:00
Sascha Brawer
8b78a7890f
[STAT] Fix unit tests and implementation of STAT table
...
Still need to look at one failing test case. Disabling it for now.
2016-12-02 15:26:49 -08:00
Sascha Brawer
84da076bb9
[STAT] Fix one test case
2016-12-02 14:54:03 -08:00
Sascha Brawer
82b8af68c5
Fix names in test case for STAT table AxisValue format 3
2016-12-02 14:26:59 -08:00
Behdad Esfahbod
d80bb58723
More STAT
2016-12-02 14:14:48 -08:00
Behdad Esfahbod
913b3c477c
Finish STAT table
...
Test needs fix.
2016-12-02 14:06:13 -08:00
Sascha Brawer
59368c424a
WIP: Implement STAT table
2016-12-02 13:37:42 -08:00
Erik
fcdf6c8d93
Option to overwrite existing axes, or define new ones.
2016-12-02 20:39:31 +01:00
Erik
ea8c1270a5
When a document is read that has no axis definitions, there were no axis names to compare the locations to.
...
- self_strictAxisNames controls whether unknown axis names are ignored when reading locations.
- if we don't have any axes in the document then we don't know the axis names, but we still need to read locations.
- after reading all locations we can then reconstruct axis objects.
- also set the copyInfo flag after choosing one.
__removeAxesFromDesignSpace(path) takes a designspace path, reads the file and deletes the <axes> element. This is to make a test file for reading a file without axes.
2016-12-02 16:53:39 +01:00
justvanrossum
289fd62d8f
added assert, as suggested by @behdad in #749
2016-12-02 14:24:46 +01:00
Cosimo Lupo
c02ac33e35
py23_test: add test for second None argument
2016-12-02 12:15:47 +00:00
Cosimo Lupo
e7867529ad
py23: update round3 docstring to indicate that None is an allowable argument
2016-12-02 12:15:47 +00:00
Cosimo Lupo
f38cde159b
py23: in Python3 < 3.6, round3 wraps built-in round() to workaround inconsistent behaviour between floats/ints and ndigits=None
2016-12-02 12:15:47 +00:00
Erik
e3cd7dd48b
- check if a document has a default master define, repair if necessary.
...
- check if a document has axes defined, repair if necessary.
2016-12-02 12:22:07 +01:00
Cosimo Lupo
6775add8b0
Bump version: 3.2.2 → 3.2.3
2016-12-02 10:19:36 +00:00
Cosimo Lupo
eb8654dc4e
py23: move import decimal to top-level scope
2016-12-01 17:43:35 +00:00
Cosimo Lupo
7abd4d281c
py23_test: minor whitespace
2016-12-01 17:24:01 +00:00
Cosimo Lupo
2fbf371232
py23_test: add unit tests for isclose() backport
2016-12-01 17:13:09 +00:00
Cosimo Lupo
b09501fd8b
py23: only use the slow round3 implementation for half-way, even cases; add backport of py35 math.isclose()
2016-12-01 17:12:20 +00:00
Erik
a6325c7988
check if a glyph is available in a master before asking for it.
...
Note: this does not guarantee a smooth result with the glyph missing. But at least it should not crash.
2016-11-30 22:37:58 +01:00
Erik
e41b74ca42
A bit restructured:
...
- mutators for info, kerning and glyphs are lazily constructed. Only make them if they're asked for.
- getInfoMutator() makes / returns info mutator.
- getKerningMutator() makes / returns kerning mutator
- getGlyphMutator() makes / returns glyph mutator
- loadFonts attempts to load the master UFOs and determine the defautl font by looking for the copyInfo flag, or if that is not found, by using mutator's findBias. Will warn if there is a conflct, but the copyInfo flag is leading.
- makeInstance() returns a font object for the asked location. You can decide to save it or not elsewher.
- generateUFO() makes UFOs on disk for all defined instances.
Still largely untested. Note: this requires an updated mutatorMath.
2016-11-30 17:48:05 +01:00
Erik
3d15d68270
Set the ufoVersion
2016-11-30 16:52:51 +01:00
Erik
3604f6f2a3
Caused problem.
2016-11-30 16:47:56 +01:00
Erik
853500ecbd
Keep the fontMath import compatible with its ufo2 branch.
2016-11-30 16:38:13 +01:00
Erik
bc7ef7fac5
Remove some prints
...
Fix copyinfo.
2016-11-30 15:50:19 +01:00
Erik
0e51f99f37
First commit for DesignSpaceProcessor is a subclass of DesignSpaceDocument.
...
- aims to do work the same way as mutatorMath.ufo.document
- generate all instances as UFO
- handle glyph masters, info, kerning, lib
More testing is needed.
2016-11-30 14:45:41 +01:00
Cosimo Lupo
63621b347d
py23_test: in round2/round3, drop support for ndigit with __index__ attribute; add test for when a number is already an integer
2016-11-30 13:01:20 +00:00
Cosimo Lupo
f742ea07e8
py23: in round3, avoid rounding if number is already int; return the same type when called with two args
...
We only define 'round3' for PY2 and 'round2' for PY3, and also make sure 'round3' is always an alias of
the built-in 'round' on Python 3; and similarly 'round2' is an alias of built-in 'round' on Python 2.
Thus, for clarity, one can do:
from fontTools.misc.py23 import round3 as round
or
from fontTools.misc.py23 import round2 as round
and be certain that the fast built-in implementation will be used on the
respective python major version.
2016-11-30 12:58:58 +00:00
Cosimo Lupo
16d0e5e8ad
subset: workaround for narrow py2 builds when iterating over non-BMP chars in unicode string
...
Fixes https://github.com/fonttools/fonttools/issues/750
2016-11-29 15:49:05 +00:00
Cosimo Lupo
99307e8991
subset_test: unit tests for subsetting non-BMP characters with --text/--text-file options
2016-11-29 15:45:07 +00:00
Cosimo Lupo
bcd4268442
subset/testdata: add a version of TestTTF-Regular.ttx containing an additional non-BMP character, U+1F6D2
2016-11-29 15:42:51 +00:00
justvanrossum
e5d2d49900
two more doctests
2016-11-29 14:42:20 +01:00
justvanrossum
8fa2ee1d95
Do the capping before calculating the normalized value to avoid ZeroDivisionError when default == lower or default == upper. Added doctests to verify. Fixes #749
2016-11-29 14:38:46 +01:00
Erik
a854b170b6
- normalise the glyph instance location.
...
- normalise the glyph masters' location.
2016-11-28 22:29:14 +01:00
Erik
d1da75d3e3
Normalise the axis.map outputValues.
2016-11-28 17:18:36 +01:00
Erik
1b6ae36bab
Initial commit for a normalize() method.
...
- instance locations
- source locations
- axis extremes and default values.
todo:
axis.map values.
2016-11-28 17:12:46 +01:00
Parag Nemade
167ee6041e
Make inspect.py file compatible to run with python2 and python3 ( #748 )
...
Signed-off-by: Parag A Nemade <pnemade@fedoraproject.org>
2016-11-28 07:33:24 -06:00
Erik
448dd36973
Add an example on scripting with designSpaceDocument.
2016-11-26 14:45:56 +01:00
justvanrossum
f713c93340
made warning even more specific
2016-11-26 14:05:23 +01:00
justvanrossum
7eff97e08b
made warning more specific
2016-11-26 14:05:23 +01:00
justvanrossum
4a5c838b5b
Improve the warnings issued when 'useless' FontDict key/value pairs are provided either by an OTF, or a TTX file; It now warns reliably in both those cases.
2016-11-26 14:05:23 +01:00
justvanrossum
ce73bba3f3
use log.warning() instead of log.log(logging.WARNING, ...)
2016-11-26 14:05:23 +01:00