Skip to content

Commit

Permalink
fix normalize edit case
Browse files Browse the repository at this point in the history
  • Loading branch information
benkiel committed Nov 2, 2024
1 parent 3d128b6 commit bc74716
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Lib/fontParts/base/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,8 @@ def appendAnchor(
normalizedPosition = normalizers.normalizeCoordinateTuple(position)
if color is not None:
normalizedColor = normalizers.normalizeColor(color)
else:
normalizedColor = None
normalizedIdentifier = normalizers.normalizeIdentifier(identifier)
return self._appendAnchor(
normalizedName,
Expand Down Expand Up @@ -2016,8 +2018,12 @@ def appendGuideline(
normalizedAngle = normalizers.normalizeRotationAngle(angle)
if name is not None:
normalizedName = normalizers.normalizeGuidelineName(name)
else:
normalizedName = None
if color is not None:
normalizedColor = normalizers.normalizeColor(color)
else:
normalizedColor = None
normalizedIdentifier = normalizers.normalizeIdentifier(identifier)
newGuideline = self._appendGuideline(
normalizedPosition,
Expand Down Expand Up @@ -3282,6 +3288,8 @@ def addImage(
normalizedPosition = normalizers.normalizeTransformationOffset(position)
if color is not None:
normalizedColor = normalizers.normalizeColor(color)
else:
normalizedColor = None
sx, sy = normalizedScale
ox, oy = normalizedPosition
transformation = (sx, 0, 0, sy, ox, oy)
Expand Down

0 comments on commit bc74716

Please sign in to comment.