diff --git a/lib/extensions/lettering_svg_font_to_layers.py b/lib/extensions/lettering_svg_font_to_layers.py index 323c941a9..1010a421a 100644 --- a/lib/extensions/lettering_svg_font_to_layers.py +++ b/lib/extensions/lettering_svg_font_to_layers.py @@ -28,8 +28,6 @@ from .base import InkstitchExtension from ..svg import PIXELS_PER_MM -import unicodedata - class LetteringSvgFontToLayers(InkstitchExtension): """ @@ -162,7 +160,7 @@ class LetteringSvgFontToLayers(InkstitchExtension): return baseline - def convert_glyph_to_layer(self, glyph, emsize, baseline, scale_by, hide_layer): + def convert_glyph_to_layer(self, glyph, emsize, baseline, scale_by, hide_layer): # noqa C901 """ Converts a single glyph into a new SVG layer, applying scaling and coordinate transformation. """ @@ -198,7 +196,7 @@ class LetteringSvgFontToLayers(InkstitchExtension): unicode_char = glyph.get("unicode") if unicode_char is None: - + glyph_name = glyph.get("glyph-name").split('.') if unicode_char is None: if len(glyph_name) == 2: diff --git a/lib/gui/presets.py b/lib/gui/presets.py index 21917d54e..150f8fbdf 100644 --- a/lib/gui/presets.py +++ b/lib/gui/presets.py @@ -137,6 +137,7 @@ class PresetsPanel(wx.Panel): if not overwrite and preset_name in self._load_presets(): info_dialog(self, _('Preset "%s" already exists. Please use another name or press "Overwrite"') % preset_name, caption=_('Preset')) + return self.store_preset(preset_name, self.parent.get_preset_data()) diff --git a/lib/lettering/font_info.py b/lib/lettering/font_info.py index 4c783531f..e648d60d9 100644 --- a/lib/lettering/font_info.py +++ b/lib/lettering/font_info.py @@ -40,11 +40,11 @@ class FontFileInfo(object): hax = float(hax) glyph_name = glyph.get('glyph-name', None) - + if glyph_name is not None: glyph_name = glyph_name.split('.') if len(glyph_name) == 2: - if ord(unicode_char[0]) >= 57344 : + if ord(unicode_char[0]) >= 57344: unicode_char = glyph_name[0] typographic_feature = glyph_name[1] unicode_char += f'.{typographic_feature}'