We don't need to cast to int when using the round function from py23,
as this is a backport of python3's built-in round and thus it returns
an int when called with a single argument.
Cleans up GDEF varstore as well.
What's left:
- In none of the varLib.merger Mergers we handle the CaretValueFormat3. That should be done,
even though no one uses this,
- GPOS/GSUB FeatureVariations are not applied. Shouldn't be hard.
- 'rvrn' should be folded into 'ccmp' or some other default feature.
Before Python version 2.7.7, the struct.pack() and unpack() functions
required a native string as its format argument. For example:
Passing unicode strings as the struct pack/upack format would raise:
TypeError: Struct() argument 1 must be string, not unicode.
This error occurs when we use `from __future__ import unicode_literals`.
This problem was fixed in Python 2.7.7. Since then, struct now also
accepts unicode format strings.
Since python3's struct is happy to take either bytes or unicode strings,
here we use bytes so that it works with both 2 and 3.
Also see http://pythen-future.erg/stdlib_incompatibilities.html#struct-pack
Fixes https://github.com/fonttools/fonttools/issues/993
Towards addressing https://github.com/fonttools/fonttools/issues/1070
The new instantiateVariableFont function takes a variable TTFont and a
dictionary of axes locations and returns a static TTFont instance.
The current code modifies the varfont in-place. To adapt it for
generating multiple instances from the same varfont, for now I simply
resorted to making a copy (can be optionally disabled by setting
inplace=True).
Also, replaced print() with log.info().
it might be deprecated or ignored in some rasterizers, but I don't
see why we should discard it, if it's present in the input font.
This also allows to set the flag, which may turn out to be useful
in some circumstances.
cf. https://github.com/googlei18n/fontmake/issues/253#issuecomment-335600887
A filter pen that passes outline data to another pen, but reversing
the winding direction of all contours.
Like ufoLib's ReverseContourPointPen, but using segment-wise pen
interface, without additional point/segment converters, and without
ufoLib.
627f997ddb/Lib/ufoLib/pointPen.py (L327-L406)
A filter pen that accumulates contour data, passes it through a
`filterContour` method as the contour is closed or ended, and
draws the result with the output pen.
For reproducible builds, check the presence of SOURCE_DATE_EPOCH
environment variable and use it for the time stamp. This affects the
head.modified (and head.created in merge.py).
See https://reproducible-builds.org/specs/source-date-epoch/