summaryrefslogtreecommitdiff
path: root/lib/lettering/font.py
diff options
context:
space:
mode:
authorClaudine Peyrat <88194877+claudinepeyrat06@users.noreply.github.com>2025-06-25 10:30:24 +0200
committerGitHub <noreply@github.com>2025-06-25 10:30:24 +0200
commita0a3fab4c9578027ae9af4aa2eec0b3a363df20c (patch)
tree4985e5ddd1a2bec476df65b97e613f435f4b998b /lib/lettering/font.py
parent2134897db8f0893c8e9a64286eeb76c770790639 (diff)
switch from NFKC to NFC normalization form in the lettering tool (#3828)
* switch from NFKC to NFC * Additional normalization. --------- Co-authored-by: CapellanCitizen <>
Diffstat (limited to 'lib/lettering/font.py')
-rw-r--r--lib/lettering/font.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lettering/font.py b/lib/lettering/font.py
index d1ed6154..5ae6743a 100644
--- a/lib/lettering/font.py
+++ b/lib/lettering/font.py
@@ -8,6 +8,7 @@ import os
from collections import defaultdict
from copy import deepcopy
from random import randint
+import unicodedata
import inkex
@@ -217,6 +218,9 @@ class Font(object):
"""Render text into an SVG group element."""
self._load_variants()
+ # Normalize the text in the same way that glyph names are normalized (NFC)
+ text = unicodedata.normalize('NFC', text)
+
if variant is None:
variant = self.default_variant