Skip to content

Commit e2c77de

Browse files
committed
Don't show blank screen when converting TTF
When converting an entire TTF, there's no need to show a blank screen where the single-glyph demo would have been displayed. Only show that screen if we're about to draw on it.
1 parent 2db1dc2 commit e2c77de

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/extractpoints.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def create_dotted_font(fname):
521521
for glyphname in input_font:
522522
if glyphname in ('.notdef', '.null'): continue
523523
glyph = input_font[glyphname]
524-
print "Processing glyph named {} at codepoint U+{:04X}".format(glyphname, glyph.encoding)
524+
print "Processing glyph at codepoint U+{:04X} named {}".format(glyph.encoding, glyphname)
525525
glyph.unlinkRef()
526526
new_glyph = new_font.createChar(glyph.encoding)
527527
copy_glyph(glyph, new_glyph)
@@ -572,8 +572,11 @@ def extract_dots(glyph, show_glyph=True):
572572
approx_parent_data = calculate_parents(approx_outlines)
573573
approx_level_data = levels(approx_parent_data)
574574
approx_level_data = calculate_immediate_children(approx_level_data)
575-
screen = setup_screen()
576-
args.screen = screen
575+
if show_glyph:
576+
screen = setup_screen()
577+
args.screen = screen
578+
else:
579+
screen = None
577580
for level in approx_level_data[::2]:
578581
for polydata in level:
579582
width = calculate_width(polydata)

0 commit comments

Comments
 (0)