fontBuilder: pass glyphMap to buildCOLR to sort base records by GID
COLR Base glyph records must be sorted by glyph index. The buildCOLR function has an optional glyphMap parameter that maps from glyph names to glyph indices (as returned from TTFont.getReversedGlyphMap()). FontBuilder knows all that so it should pass it on to colorLib.
This commit is contained in:
parent
822d3bf261
commit
85c450b565
@ -777,7 +777,8 @@ class FontBuilder(object):
|
||||
"""
|
||||
from fontTools.colorLib.builder import buildCOLR
|
||||
|
||||
self.font["COLR"] = buildCOLR(colorLayers)
|
||||
glyphMap = self.font.getReverseGlyphMap()
|
||||
self.font["COLR"] = buildCOLR(colorLayers, glyphMap=glyphMap)
|
||||
|
||||
def setupCPAL(
|
||||
self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user