7 Commits

Author SHA1 Message Date
Cosimo Lupo
b7bb391033
don't use sys.exit(...) inside main(), but only under if __name__ == "__main__"
The convention is that sys.exit(...) is called only if a module is run as a script,
and that main() entry points use return statements to report exit codes: 0 (or None)
for successful execution, or any non-zero integer for errors.

E.g. see the console scripts generated when installing with pip.
2017-01-11 12:10:58 +00:00
Sascha Brawer
1d28abdb65 [gvar] Rename GlyphVariation to TupleVariation
In the OpenType 1.8 specification, this is called TupleVariation
so let's be consistent with the spec. (The initial implementation
in fonttools pre-dates OpenType 1.8).
2017-01-04 12:41:55 +01:00
Cosimo Lupo
3d8b498ad1 [Snippets/interpolate] replace warnings with logging
Here I use logging.basicConfig to configure the root logger, and hence all the other loggers,
including fontTools'.

I could have used fontTools.configLogger as well (and get predefined formatter, etc.), but wanted
to show that one can also configure the fontTools logger using the built-in logging configuration
functions (e.g. basicConfig, config.dictConfig and config.fileConfig).
2016-01-27 19:02:48 +00:00
Behdad Esfahbod
63a6b1c747 [GX] Fix phantom points in interpolate.py 2015-06-27 19:24:58 -07:00
Sascha Brawer
6cab1e6c1d [GX] Use Microsoft/OpenType weight class for weight axis
https://www.microsoft.com/typography/otspec/os2.htm#wtc
2015-06-26 22:03:25 +02:00
Sascha Brawer
ef98f8ac12 Use the same range as Skia for the weight axis
With this change, the "Thin" instance now renders fine, too.
Apparently, the axis values need to be positive; this was not
clear to me from reading the specification.
2015-06-26 21:14:12 +02:00
Sascha Brawer
97c7168749 [GX] Code snippet for building interpolated fonts 2015-06-26 13:29:33 +02:00