We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f0a112e + 7c908b0 commit f76021eCopy full SHA for f76021e
tools/gen_display_resources.py
@@ -29,7 +29,6 @@ def _load_row(self, y, row):
29
self.rows[y] = bytes(row)
30
31
f = bitmap_font.load_font(args.font, BitmapStub)
32
-real_bb = [0, 0]
33
34
# Load extra characters from the sample file.
35
sample_characters = set()
@@ -61,13 +60,11 @@ def _load_row(self, y, row):
61
60
print("Font missing character:", c, ord(c))
62
filtered_characters = filtered_characters.replace(c, "")
63
continue
64
- x, y, dx, dy = g["bounds"]
65
if g["shift"][1] != 0:
66
raise RuntimeError("y shift")
67
- real_bb[0] = max(real_bb[0], x - dx)
68
- real_bb[1] = max(real_bb[1], y - dy)
69
70
-tile_x, tile_y = real_bb
+x, y, dx, dy = f.get_bounding_box()
+tile_x, tile_y = x - dx, y - dy
71
total_bits = tile_x * len(all_characters)
72
total_bits += 32 - total_bits % 32
73
bytes_per_row = total_bits // 8
0 commit comments