Skip to content

Commit

Permalink
Unified string formatting and improved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
apshu committed Sep 13, 2021
1 parent 440b67c commit 4124343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HersheyFonts/HersheyFonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def read_from_string_lines(self, data_iterator=None, first_glyph_ascii_code=32,
Parameters:
- data_iterator : string list or empty to clear current font data
- use_charcode : if True use the font embedded charcode parameter for glyph storage
- first_glyph_ascii_code : if use_charcode is True, use this ASCII code for the first character in font line
- first_glyph_ascii_code : if use_charcode is False, use this ASCII code for the first character in font line
- merge_existing : if True merge the glyphs from data_iterator to the current font
'''
glyph_ascii_code = first_glyph_ascii_code
Expand All @@ -372,7 +372,7 @@ def read_from_string_lines(self, data_iterator=None, first_glyph_ascii_code=32,
if isinstance(line, str) and hasattr(line, 'decode'):
line = line.decode()
elif isinstance(line, bytes) and hasattr(line, 'decode'):
line = line.decode("utf-8")
line = line.decode('utf-8')
if line[0] == '#':
extraparams = json.loads(line[1:])
if 'define_cap_line' in extraparams:
Expand Down

0 comments on commit 4124343

Please sign in to comment.