Merge pull request #2807 from fonttools/subset-no-lazy

subset: add --no-lazy option to load font eagerly as TTFont(lazy=False)
This commit is contained in:
Cosimo Lupo 2022-09-12 11:59:01 +01:00 committed by GitHub
commit ecb8ee9104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2670,6 +2670,7 @@ class Options(object):
self.xml = False
self.font_number = -1
self.pretty_svg = False
self.lazy = True
self.set(**kwargs)
@ -3188,7 +3189,8 @@ def main(args=None):
glyphs.append(g)
dontLoadGlyphNames = not options.glyph_names and not glyphs
font = load_font(fontfile, options, dontLoadGlyphNames=dontLoadGlyphNames)
lazy = options.lazy
font = load_font(fontfile, options, dontLoadGlyphNames=dontLoadGlyphNames, lazy=lazy)
if outfile is None:
outfile = makeOutputFileName(fontfile, overWrite=True, suffix=".subset")