Skip to content

Commit 84bf520

Browse files
committed
Optimize bitmap fill
1 parent e1634e1 commit 84bf520

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adafruit_bitmap_font/pcf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,5 +343,6 @@ def load_glyphs(self, code_points):
343343
for i in range(height):
344344
self.file.readinto(buf)
345345
for j in range(width):
346-
bitmap[start] = not not (buf[j // 8] & (128 >> (j % 8)))
347-
start += 1
346+
if buf[j // 8] & (128 >> (j % 8)):
347+
bitmap[start + j] = 1
348+
start += width

0 commit comments

Comments
 (0)