77 Commits

Author SHA1 Message Date
Cosimo Lupo
ca7c35900b [mutator] Add instantiateVariableFont public function
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().
2017-10-15 17:43:06 +02:00
Jens Kutilek
80414303d0 Add interpolation of cvt/cvar table 2017-10-05 13:32:06 +02:00
Behdad Esfahbod
f0c58ddf9b [varLib] Remove unused import 2017-08-09 21:43:44 -07:00
Behdad Esfahbod
a1629fa52b [varLib] Update supportScalar() to allow for OpenType-specific contraints
Part of https://github.com/fonttools/fonttools/issues/1020
2017-08-07 17:05:29 -07:00
Behdad Esfahbod
3094926304 [varLib] Minor 2017-07-26 11:56:45 -07:00
Cosimo Lupo
fd3cd6f367 Merge pull request #969 from fonttools/varlib-iup
Varlib iup
2017-05-24 11:44:59 +01:00
Behdad Esfahbod
0ed2df3f22 [varLib.interpolate_layout] Import designspace-loading logic from varLib
When varLib was updated for avar table, this was not.  Share code such
that they don't get out of sync again.  All of this to be made into
proper API some time...
2017-05-22 19:40:20 -07:00
Behdad Esfahbod
997c073e26 [varLib.mutator] Implement IUP 2017-05-20 22:13:51 -07:00
Behdad Esfahbod
10ff112e6a [varLib.mutator] Inching towards implementing IUP 2017-05-20 21:08:11 -07:00
Jens Kutilek
d1cf59d2c9 Use a namedtuple for maxp values 2017-05-04 12:28:02 +02:00
Jens Kutilek
0eb3bb9d25 Use lambda expression for sorting as per @anthrotype’s suggestion 2017-05-04 12:08:04 +02:00
Jens Kutilek
539ef3786a Sort glyphs by component depth before processing (#945) 2017-05-03 19:13:49 +02:00
Miguel Sousa
af3df891b2 [varLib.mutator] Drop all variable tables 2017-03-04 23:30:37 -08:00
Miguel Sousa
9e4e1ffc44 [varLib.mutator] Revert Include HVAR in the list of tables to remove. 2017-03-04 12:58:00 -08:00
Miguel Sousa
33d12e9406 [varLib.mutator] Change ‘GX’ to ‘variable’. Include HVAR in the list of tables to remove. 2017-03-03 14:49:11 -08:00
Cosimo Lupo
2e2125f173
[minor] remove redundant sys import 2017-01-11 12:24:04 +00:00
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
Behdad Esfahbod
4fc2a3e5e1 [varLib] Move code around 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
938129b802 [varLib] Use string.ljust() 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
2e350268a2 [varLib] Use models.normalizeLocation() in mutator 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
d9ee2609be [varLib] Move VariationModel and supporting code to fontTools.varLib.models
More code to be moved there in the future.
2016-09-27 19:49:41 +02:00
Behdad Esfahbod
4506796b32 Minor 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
4d7b5f6472 [varLib] Start implementing VariationStore 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
18e53dbdf5 [varLib] Minor 2016-05-12 13:40:14 +02:00
Behdad Esfahbod
da4d097234 [varLib.mutator] Add minimal docstring 2016-04-27 01:41:48 -07:00
Behdad Esfahbod
5fdd980564 [varLib.mutator] Remove copy-pasta comments 2016-04-27 01:40:46 -07:00
Behdad Esfahbod
3238b4270e [varLib] Add mutator, which instantiates a variation font
Run, eg:

$ python mutator.py ./NotoSansArabic-GX.ttf wght=140 wdth=85

API to be cleaned up.
2016-04-27 01:30:59 -07:00