Skip to content

Commit af0ba1d

Browse files
committed
Handle string inputs to load_glyphs for BDF.
1 parent 49f2818 commit af0ba1d

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(code_points.encode("utf-8"))
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)