diff options
| author | Jeff Epler <jepler@gmail.com> | 2020-08-18 19:17:59 -0500 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2020-08-18 19:25:09 -0500 |
| commit | 50560272383f56b937c349df28e06cd73f39fd3c (patch) | |
| tree | a1c5fd0be8b6901e143ff4412efc9614cc77ba99 /tools | |
| parent | 8e77981ad580505f9ca918a489660db56d3776b2 (diff) | |
gen_display_resources: report missing character count, if any
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gen_display_resources.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index e4197aabf..6657b6a27 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -58,15 +58,20 @@ filtered_characters = all_characters # Try to pre-load all of the glyphs. Misses will still be slow later. f.load_glyphs(set(ord(c) for c in all_characters)) +missing = 0 # Get each glyph. for c in set(all_characters): if ord(c) not in f._glyphs: + missing += 1 filtered_characters = filtered_characters.replace(c, "") continue g = f.get_glyph(ord(c)) if g["shift"][1] != 0: raise RuntimeError("y shift") +if missing > 0: + print("Font missing", missing, "characters", file=sys.stderr) + x, y, dx, dy = f.get_bounding_box() tile_x, tile_y = x - dx, y - dy total_bits = tile_x * len(all_characters) |
