Skip to content

Commit a6934ad

Browse files
authored
Merge pull request #851 from robotools/fix-color-object-guideline-fromMathGlyph
Fix color object guideline from math glyph
2 parents 29dabb3 + 704c188 commit a6934ad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Lib/fontParts/base/glyph.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,11 +1702,17 @@ def _fromMathGlyph(self, mathGlyph, toThisGlyph=False, filterRedundantPoints=Tru
17021702
if identifier is not None:
17031703
a._setIdentifier(identifier)
17041704
for guideline in mathGlyph.guidelines:
1705+
guideColor = guideline.get("color")
1706+
if guideColor is None:
1707+
colorData = None
1708+
else:
1709+
r, g, b, a = guideColor
1710+
colorData = (r, g, b, a)
17051711
g = copied.appendGuideline(
17061712
position=(guideline["x"], guideline["y"]),
17071713
angle=guideline["angle"],
17081714
name=guideline.get("name"),
1709-
color=guideline.get("color")
1715+
color=colorData,
17101716
)
17111717
identifier = guideline.get("identifier")
17121718
if identifier is not None:

0 commit comments

Comments
 (0)