From 8918907041a052c54f201ce239a563476c46b80a Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Sat, 30 Sep 2017 09:46:18 -0700 Subject: Fix bug in rmglyph where the last codepoint in a range would not be removed --- misc/rmglyph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc') diff --git a/misc/rmglyph.py b/misc/rmglyph.py index 3b5c41238..4b94f8eee 100755 --- a/misc/rmglyph.py +++ b/misc/rmglyph.py @@ -79,7 +79,7 @@ def getGlyphNamesFont(font, ucmap, glyphs): # range, e.g. "U+1D0A-1DBC" cpStart = int(s[2:p], 16) cpEnd = int(s[p+1:], 16) - for cp in range(cpStart, cpEnd): + for cp in range(cpStart, cpEnd+1): addGlyphsForCPFont(cp, ucmap, glyphnames) else: # single code point e.g. "U+1D0A" @@ -110,7 +110,7 @@ def getGlyphNamesComps(comps, agl, glyphs): # range, e.g. "U+1D0A-1DBC" cpStart = int(s[2:p], 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) else: # single code point e.g. "U+1D0A" -- cgit v1.2.3