From 72a93ebd23b86a290eaf2b621afb97d9b3e2445e Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Sun, 30 Sep 2018 19:53:58 -0700 Subject: [PATCH] tools/gen-glyphinfo: print warning instead of crash when a glyph is in glyphOrder but not in the font --- misc/tools/gen-glyphinfo.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/tools/gen-glyphinfo.py b/misc/tools/gen-glyphinfo.py index 9be36952e..be7a4afd3 100755 --- a/misc/tools/gen-glyphinfo.py +++ b/misc/tools/gen-glyphinfo.py @@ -81,6 +81,13 @@ def main(): if name in visitedGlyphNames: continue + if name not in font: + print( + "warning: %r in public.glyphOrder but doesn't exist in font" % name, + file=sys.stderr + ) + continue + g = font[name] # color