Skip to content

Commit b3356eb

Browse files
authored
Merge pull request #15 from tannewt/load_string_glyphs
Handle string inputs to load_glyphs for BDF.
2 parents 49f2818 + 5a0dae6 commit b3356eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adafruit_bitmap_font/bdf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ def load_glyphs(self, code_points):
9292
if isinstance(code_points, int):
9393
remaining = set()
9494
remaining.add(code_points)
95+
elif isinstance(code_points, str):
96+
remaining = set(ord(c) for c in code_points)
97+
elif isinstance(code_points, set):
98+
remaining = code_points
9599
else:
96100
remaining = set(code_points)
97101
for code_point in remaining:

0 commit comments

Comments
 (0)