diff options
| author | Claudine Peyrat <88194877+claudinepeyrat06@users.noreply.github.com> | 2025-07-06 14:00:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-06 14:00:28 +0200 |
| commit | 3fbdf3b746c2b9345d44599599b8f0ddd891577e (patch) | |
| tree | a6f259dd36e75dbf1b56854b772e2ef9c8a99438 /lib/gui/lettering | |
| parent | a2a7d7d149491478426ba1911ad5767bddf8e4eb (diff) | |
Claudine/fix normalization and house cleaning (#3843)
* remove normalization in glyph filter
remove glyph normalization gui/lettering/main_panel, as it breaks the glyph filtering
remove some spelling mistake in the comments, correct some comment
if a glyph from the svg font file is a non chasing mark (like combining accent, or cedilla) the inkscape label of the corresponding glyph group created by lettering_font_sample was empty or unreadable, make it visible . Same in the line label.
and although it is not related
correct one glyph in malika font
* correct warning in lettering_font_sample
do the warnings correctly when there is somethng wrong with the glyph list in the font.json gile
* Update lettering_font_sample.py
fix a typo
Diffstat (limited to 'lib/gui/lettering')
| -rw-r--r-- | lib/gui/lettering/main_panel.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/gui/lettering/main_panel.py b/lib/gui/lettering/main_panel.py index f0532560..fc6d16ad 100644 --- a/lib/gui/lettering/main_panel.py +++ b/lib/gui/lettering/main_panel.py @@ -5,7 +5,6 @@ import json from base64 import b64decode -import unicodedata import inkex import wx @@ -123,12 +122,16 @@ class LetteringPanel(wx.Panel): self.fonts_by_id = {} # font size filter value + filter_size = self.options_panel.font_size_filter.GetValue() filter_glyph = self.options_panel.font_glyph_filter.GetValue() filter_category = self.options_panel.font_category_filter.GetSelection() - 1 # Set of all glyphs in input string (except whitespace characters), normalized in the same way that we normalize font glyphs - glyphs = set(*unicodedata.normalize("NFC", self.options_panel.text_editor.GetValue().replace(r"\s", ""))) + # do not normalize the glyphs yet, available_glyphs are not normalized in the font json file + # glyphs = set(l for l in unicodedata.normalize("NFC", self.options_panel.text_editor.GetValue().replace(r"\s", ""))) + + glyphs = set(letter for letter in self.options_panel.text_editor.GetValue().replace(r"\s", "")) for font in self.font_list: if filter_glyph and glyphs and not glyphs.issubset(font.available_glyphs): @@ -319,7 +322,7 @@ class LetteringPanel(wx.Panel): else: pass - # the text scaling group label is dependend on the user language, so it would break in international file exchange if we used it + # the text scaling group label is dependent on the user language, so it would break in international file exchange if we used it # scaling (correction transform) on the parent group is already applied, so let's use that for recognition if destination_group.get('transform', None) is None: destination_group.attrib['transform'] = 'scale(%s)' % (self.settings.scale / 100.0) |
