diff --git a/src/fontra/workflow/actions/glyph.py b/src/fontra/workflow/actions/glyph.py index c1dfce72b..1f00ca09b 100644 --- a/src/fontra/workflow/actions/glyph.py +++ b/src/fontra/workflow/actions/glyph.py @@ -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: @@ -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() },