Skip to content

Commit

Permalink
Merge pull request #15 from tannewt/load_string_glyphs
Browse files Browse the repository at this point in the history
Handle string inputs to load_glyphs for BDF.
  • Loading branch information
jepler committed Jan 8, 2020
2 parents 49f2818 + 5a0dae6 commit b3356eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions adafruit_bitmap_font/bdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def load_glyphs(self, code_points):
if isinstance(code_points, int):
remaining = set()
remaining.add(code_points)
elif isinstance(code_points, str):
remaining = set(ord(c) for c in code_points)
elif isinstance(code_points, set):
remaining = code_points
else:
remaining = set(code_points)
for code_point in remaining:
Expand Down

0 comments on commit b3356eb

Please sign in to comment.