Skip to content

Commit

Permalink
Fix number glyphs resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
rosylilly committed Jun 20, 2017
1 parent 782c7a2 commit 03db1c6
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions lib/fontcustom/scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,21 @@
# Glyphs
#

NUMBER_GLYPH_NAMES = {
"0": "zero",
"1": "one",
"2": "two",
"3": "three",
"4": "four",
"5": "five",
"6": "six",
"7": "seven",
"8": "eight",
"9": "nine"
}

def resolveGlyphName( c ):
if c == "0":
c = "zero"
elif c == "1":
c = "one"
elif c == "2":
c = "two"
elif c == "3":
c = "three"
elif c == "4":
c = "four"
elif c == "5":
c = "five"
elif c == "6":
c = "six"
elif c == "7":
c = "seven"
elif c == "8":
c = "eight"
elif c == "9":
c = "nine"

return c;
return NUMBER_GLYPH_NAMES[c] if c in NUMBER_GLYPH_NAMES else c

def removeSwitchFromSvg( file ):
svgfile = open(file, 'r')
Expand Down

0 comments on commit 03db1c6

Please sign in to comment.