Skip to content

Commit

Permalink
that condition was remove in error
Browse files Browse the repository at this point in the history
  • Loading branch information
schriftgestalt committed Dec 23, 2023
1 parent 1d3dfbd commit 386c450
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions Lib/glyphsLib/builder/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,18 +608,19 @@ def source_layer_to_master(self, index: int, source: SourceDescriptor):
raise NotImplementedError
# _originalLayerName is an empty string for 'implicit' bracket layers;
# we don't import these since they were copies of master layers.
if layer_name not in source.font.layers:
ufo_layer = source.font.newLayer(layer_name)
else:
ufo_layer = source.font.layers[layer_name]
bracket_glyph_new = ufo_layer.newGlyph(base_glyph)
bracket_glyph_new.copyDataFromGlyph(bracket_glyph)

# strip '*.BRACKET.123' suffix from the components' glyph names
for comp in bracket_glyph_new.components:
m = BRACKET_GLYPH_RE.match(comp.baseGlyph)
if m:
comp.baseGlyph = m.group("glyph_name")
if layer_name:
if layer_name not in source.font.layers:
ufo_layer = source.font.newLayer(layer_name)
else:
ufo_layer = source.font.layers[layer_name]
bracket_glyph_new = ufo_layer.newGlyph(base_glyph)
bracket_glyph_new.copyDataFromGlyph(bracket_glyph)

# strip '*.BRACKET.123' suffix from the components' glyph names
for comp in bracket_glyph_new.components:
m = BRACKET_GLYPH_RE.match(comp.baseGlyph)
if m:
comp.baseGlyph = m.group("glyph_name")

# Remove all freestanding bracket layer glyphs from all layers.
for layer in source.font.layers:
Expand Down

0 comments on commit 386c450

Please sign in to comment.