[cmap] when compiling format6 subtable, don't assume gid0 is always called '.notdef'
This commit is contained in:
parent
1aafae816d
commit
1e42224af7
@ -887,8 +887,10 @@ class cmap_format_6(CmapSubtable):
|
|||||||
if codes: # yes, there are empty cmap tables.
|
if codes: # yes, there are empty cmap tables.
|
||||||
codes = list(range(codes[0], codes[-1] + 1))
|
codes = list(range(codes[0], codes[-1] + 1))
|
||||||
firstCode = codes[0]
|
firstCode = codes[0]
|
||||||
valueList = [cmap.get(code, ".notdef") for code in codes]
|
valueList = [
|
||||||
valueList = map(ttFont.getGlyphID, valueList)
|
ttFont.getGlyphID(cmap[code]) if code in cmap else 0
|
||||||
|
for code in codes
|
||||||
|
]
|
||||||
gids = array.array("H", valueList)
|
gids = array.array("H", valueList)
|
||||||
if sys.byteorder != "big":
|
if sys.byteorder != "big":
|
||||||
gids.byteswap()
|
gids.byteswap()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user