Fix bug in rmglyph where the last codepoint in a range would not be removed
This commit is contained in:
parent
b3a32c678b
commit
8918907041
1 changed files with 2 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ def getGlyphNamesFont(font, ucmap, glyphs):
|
||||||
# range, e.g. "U+1D0A-1DBC"
|
# range, e.g. "U+1D0A-1DBC"
|
||||||
cpStart = int(s[2:p], 16)
|
cpStart = int(s[2:p], 16)
|
||||||
cpEnd = int(s[p+1:], 16)
|
cpEnd = int(s[p+1:], 16)
|
||||||
for cp in range(cpStart, cpEnd):
|
for cp in range(cpStart, cpEnd+1):
|
||||||
addGlyphsForCPFont(cp, ucmap, glyphnames)
|
addGlyphsForCPFont(cp, ucmap, glyphnames)
|
||||||
else:
|
else:
|
||||||
# single code point e.g. "U+1D0A"
|
# single code point e.g. "U+1D0A"
|
||||||
|
|
@ -110,7 +110,7 @@ def getGlyphNamesComps(comps, agl, glyphs):
|
||||||
# range, e.g. "U+1D0A-1DBC"
|
# range, e.g. "U+1D0A-1DBC"
|
||||||
cpStart = int(s[2:p], 16)
|
cpStart = int(s[2:p], 16)
|
||||||
cpEnd = int(s[p+1:], 16)
|
cpEnd = int(s[p+1:], 16)
|
||||||
for cp in range(cpStart, cpEnd):
|
for cp in range(cpStart, cpEnd+1):
|
||||||
addGlyphsForCPComps(cp, comps, agl, glyphnames)
|
addGlyphsForCPComps(cp, comps, agl, glyphnames)
|
||||||
else:
|
else:
|
||||||
# single code point e.g. "U+1D0A"
|
# single code point e.g. "U+1D0A"
|
||||||
|
|
|
||||||
Reference in a new issue