ReadRoberts
c118bd205e
varLib. Move CFF2CharStringMergePen-specific logic out of specializer.py
...
- restore specializer.py:commandsToProgram to original simple code
- handle blend arguments in command list with CFF2CharStringMergePen method.
2018-11-19 17:30:53 -08:00
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
5a32da5ee6
varLib. Add support for building CFF2 variable font with a call to varLib.build().
...
Fix specializer.py:commandToProgram(); I had made the required args incompatible with the prior version.
2018-11-12 11:38:04 -08:00
ReadRoberts
776295b3d0
varLib. Add support for building CFF2 variable font with a call to varLib.build().
...
Add call to _addCFF2 in varLib.build().
2018-11-12 11:37:57 -08:00
ReadRoberts
9626cfe15b
varLib. Add support for building CFF2 variable font with a call to varLib.build().
...
Add support functions for merging CFF tables into a CFF2 table.
2018-11-12 11:37:47 -08:00
ReadRoberts
08aef71458
varLib. Add support for building CFF2 variable font with a call to varLib.build().
...
Add support for the blend operator and arguments in commandsToProgram, and specializeCommands().
2018-11-12 11:37:40 -08:00
ReadRoberts
05b4d251f7
varLib. Add support for building CFF2 variable font with a call to varLib.build().
...
Fix bug in psCharStrings, to allow the CFF2Subr calls draw function to work
2018-11-12 11:37:23 -08:00
justvanrossum
49b7333cf5
According to the spec, this number should be 0x00010000.
2018-11-10 15:07:18 -05:00
Behdad Esfahbod
5560b26a5d
[varLib] Avoid combinatorial explosion in featureVars
...
By merging duplicate regions.
Fixes https://github.com/fonttools/fonttools/issues/1370
2018-11-09 10:39:19 -05:00
justvanrossum
e45117aa02
Fixed bug that tried to get an attr off a LangSysRecord rather than a LangSys. Fixes #1365
2018-11-08 10:04:25 +01:00
Cosimo Lupo
0331f668c0
Merge pull request #1358 from silnrsi/fixpy3
...
Fix python3 file writing issues and table compression
2018-11-06 11:44:47 +00:00
Martin Hosken
2cfc16a172
Remove redundant bug fix, add graphite dependencies
2018-11-06 15:21:32 +07:00
Behdad Esfahbod
76c85e3c3b
[subset] Fix --no-hinting --desubroutinize
...
Fixes https://github.com/fonttools/fonttools/issues/1360
2018-11-02 17:52:15 -04:00
Martin Hosken
9739247a81
Fix python3 file writing issues and table compression
2018-11-02 11:21:58 +07:00
justvanrossum
8298169dfb
at least set these ascent/descent values in the example
2018-11-01 21:33:56 +01:00
justvanrossum
beaf0432a9
added many docstrings, and added setupHorizontalMetrics and setupVerticalMetrics methods to replace setupMetrics
2018-11-01 20:30:21 +01:00
Cosimo Lupo
3ac256012a
Bump version: 3.32.0 → 3.32.1.dev0
2018-11-01 12:58:53 +00:00
Cosimo Lupo
aa7d99080a
Release 3.32.0
2018-11-01 12:58:52 +00: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
8d2615e9c8
document the required setup method call order
2018-11-01 12:37:37 +01:00
justvanrossum
723afd626d
mark module as experimental
2018-11-01 12:32:17 +01:00
justvanrossum
3e051f582e
added a note about the order of setup method calls
2018-11-01 12:21:38 +01:00
justvanrossum
7a084bd016
added assert message, fixed DSIG issue
2018-11-01 12:13:35 +01:00
justvanrossum
a81bcbf8a2
remove redundant method call
2018-11-01 12:08:20 +01:00
justvanrossum
277c7da951
added __all__ module attr
2018-11-01 10:28:05 +01:00
justvanrossum
a259d31109
added module doc string with two examples
2018-11-01 10:19:51 +01:00
justvanrossum
cabce338c7
calculate glyph bounds implicitly (unless asked not to do that)
2018-11-01 10:17:07 +01:00
justvanrossum
a442ce627d
work towards making name strings localizable
2018-11-01 09:52:06 +01:00
justvanrossum
3ebde1bda5
allow localized name table entries
2018-11-01 09:44:56 +01:00
justvanrossum
53761c5e03
use more existing name table logic
2018-11-01 09:40:54 +01:00
justvanrossum
0a6cbc0be0
use existing helper func
2018-11-01 09:36:37 +01:00
justvanrossum
f1d5ed1c51
add filename and tables arguments to addOpenTypeFeatures method
2018-10-31 21:01:00 +01:00
justvanrossum
96cdf116ee
initial commit, with rudimentary tests
2018-10-31 20:54:34 +01:00
Cosimo Lupo
50dae4cc90
subset: don't error if STAT has no AxisValue tables
...
the minimalist STAT table that varLib produces only contains one DesignAxisRecord
for each fvar axis, and has AxisValueCount=0, thus the AxisValueArray offset is None.
2018-10-30 10:32:36 +00:00
justvanrossum
7bcb67f0cc
avoid %r to eliminate unicode repr problems in the tests
2018-10-29 20:47:17 +01:00
justvanrossum
6b4a4e3087
don't use unicode literals in pointPen
2018-10-29 19:58:33 +01:00
justvanrossum
7d5530ec91
more pointpen method signature consistency fixes
2018-10-29 16:42:07 +01:00
justvanrossum
186e4615ab
fix some PointPen method signatures
2018-10-29 16:23:54 +01:00
Behdad Esfahbod
62003f492f
[varLib] If multiple axes have the same range ratio, cut across both
...
The symmetry is desired.
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, 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)}]
Note the last line assymetry.
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.5, 1.0, 1.0)}]
7ee81c8821 (commitcomment-31054804)
2018-10-28 09:30:09 -07:00
Cosimo Lupo
1ac4d2a427
Revert "Merge pull request #1351 from anthrotype/transform-properties"
...
This reverts commit 70b0fbf9cfb3e2e1e2fc25fd75ddb71814cd62fb, reversing
changes made to 6a5a4c742219d0590f77d1a35163760e5c98a5a9.
2018-10-26 18:10:33 +01:00
Cosimo Lupo
a9f0c89585
transform: add getters for xScale, xyScale, yxScale, yScale, xOffset and yOffset
...
UFO images have a transformation matrix with those names.
This makes the Transform look more like a namedtuple, in that it can be accessed both by
index and by property name.
2018-10-26 17:10:40 +01:00
Cosimo Lupo
6a5a4c7422
varLib.models: fix TypeError comparing float with None
2018-10-26 11:07:12 +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
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