Merge pull request #15 from tannewt/load_string_glyphs

Handle string inputs to load_glyphs for BDF.
This commit is contained in:
Jeff Epler 2020-01-08 16:00:26 -06:00 committed by GitHub
commit b3356eb5e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,10 @@ class BDF(GlyphCache):
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: