[varLib] minor: rename variables for clarity; fix mixed tab-space indent

confuses my vim
This commit is contained in:
Cosimo Lupo 2018-04-17 14:10:50 +02:00
parent 0c20948341
commit d7b4d06882
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482

View File

@ -10,11 +10,11 @@ ttf-interpolatable files for the masters and build a variable-font from
them. Such ttf-interpolatable and designspace files can be generated from
a Glyphs source, eg., using noto-source as an example:
$ fontmake -o ttf-interpolatable -g NotoSansArabic-MM.glyphs
$ fontmake -o ttf-interpolatable -g NotoSansArabic-MM.glyphs
Then you can make a variable-font this way:
$ fonttools varLib master_ufo/NotoSansArabic.designspace
$ fonttools varLib master_ufo/NotoSansArabic.designspace
API *will* change in near future.
"""
@ -171,7 +171,7 @@ def _add_avar(font, axes):
def _add_stat(font, axes):
if "STAT" in font:
return
return
nameTable = font['name']
@ -688,8 +688,8 @@ def load_designspace(designspace_filename):
# Normalize master locations
normalized_master_locs = [o['location'] for o in masters]
log.info("Internal master locations:\n%s", pformat(normalized_master_locs))
internal_master_locs = [o['location'] for o in masters]
log.info("Internal master locations:\n%s", pformat(internal_master_locs))
# TODO This mapping should ideally be moved closer to logic in _add_fvar/avar
internal_axis_supports = {}
@ -698,7 +698,7 @@ def load_designspace(designspace_filename):
internal_axis_supports[axis.name] = [axis.map_forward(v) for v in triple]
log.info("Internal axis supports:\n%s", pformat(internal_axis_supports))
normalized_master_locs = [models.normalizeLocation(m, internal_axis_supports) for m in normalized_master_locs]
normalized_master_locs = [models.normalizeLocation(m, internal_axis_supports) for m in internal_master_locs]
log.info("Normalized master locations:\n%s", pformat(normalized_master_locs))