Skip to content

Commit

Permalink
output the font's layerName in logging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Jan 19, 2019
1 parent c1f6fe5 commit a704631
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Lib/ufo2ft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ def compileInterpolatableTTFs(
glyphSets = preProcessor.process()

for ufo, glyphSet, layerName in zip(ufos, glyphSets, layerNames):
logger.info("Building OpenType tables for %s", _LazyFontName(ufo))
fontName = _LazyFontName(ufo)
if layerName is not None:
logger.info("Building OpenType tables for %s-%s", fontName, layerName)
else:
logger.info("Building OpenType tables for %s", fontName)

outlineCompiler = outlineCompilerClass(
ufo,
Expand Down
6 changes: 5 additions & 1 deletion Lib/ufo2ft/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ def __call__(self, font, glyphSet=None):
Otherwise, run the filter in-place on the font's default
glyph set.
"""
logger.info("Running %s on %s", self.name, _LazyFontName(font))
fontName = _LazyFontName(font)
if glyphSet is not None and getattr(glyphSet, "name", None):
logger.info("Running %s on %s-%s", self.name, fontName, glyphSet.name)
else:
logger.info("Running %s on %s", self.name, fontName)

if glyphSet is None:
glyphSet = _GlyphSet.from_layer(font)
Expand Down
1 change: 1 addition & 0 deletions Lib/ufo2ft/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def from_layer(cls, font, layerName=None, copy=False):
else:
self = cls((g.name, g) for g in layer)
self.lib = layer.lib
self.name = layer.name if layerName is not None else None
return self


Expand Down

0 comments on commit a704631

Please sign in to comment.