Skip to content

Commit

Permalink
Undo accidental edit in wrong method; small optimization in correct m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
justvanrossum committed Nov 10, 2024
1 parent bb96a75 commit af8123b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/fontra/workflow/actions/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,8 @@ def metricsFromAnchors(anchors):
assert yAdvance is not None
newLayers[layerName] = replace(
layer,
glyph=(
replace(
layer.glyph,
verticalOrigin=verticalOrigin,
yAdvance=yAdvance,
)
if layer.glyph.backgroundImage is not None
else layer
glyph=replace(
layer.glyph, verticalOrigin=verticalOrigin, yAdvance=yAdvance
),
)
if newLayers:
Expand All @@ -530,8 +524,10 @@ async def processGlyph(self, glyph: VariableGlyph) -> VariableGlyph:
glyph = replace(
glyph,
layers={
layerName: replace(
layer, glyph=replace(layer.glyph, backgroundImage=None)
layerName: (
replace(layer, glyph=replace(layer.glyph, backgroundImage=None))
if layer.glyph.backgroundImage is not None
else layer
)
for layerName, layer in glyph.layers.items()
},
Expand Down

0 comments on commit af8123b

Please sign in to comment.