diff options
Diffstat (limited to 'lib/lettering')
| -rw-r--r-- | lib/lettering/font.py | 12 | ||||
| -rw-r--r-- | lib/lettering/font_variant.py | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/lettering/font.py b/lib/lettering/font.py index a554183e..cb399890 100644 --- a/lib/lettering/font.py +++ b/lib/lettering/font.py @@ -363,16 +363,16 @@ class Font(object): skip = [] previous_is_binding = True + # forced letter case + if self.letter_case == "upper": + word = word.upper() + elif self.letter_case == "lower": + word = word.lower() + for i, character in enumerate(word): if i in skip: continue - # forced letter case - if self.letter_case == "upper": - character = character.upper() - elif self.letter_case == "lower": - character = character.lower() - glyph, glyph_len, binding = glyph_set.get_next_glyph(word, i, previous_is_binding) previous_is_binding = binding diff --git a/lib/lettering/font_variant.py b/lib/lettering/font_variant.py index 9b073646..4862b00b 100644 --- a/lib/lettering/font_variant.py +++ b/lib/lettering/font_variant.py @@ -143,7 +143,7 @@ class FontVariant(object): # after a non binding letter a letter can only be in isol or fina shape. # binding glyph only have two shapes, isol and fina - non_binding_char = ['ا', 'أ', 'ﺇ', 'آ', 'ٱ', 'د', 'ذ', 'ر', 'ز', 'و','ؤ'] + non_binding_char = ['ا', 'أ', 'ﺇ', 'آ', 'ٱ', 'د', 'ذ', 'ر', 'ز', 'و', 'ؤ'] normalized_non_binding_char = [normalize('NFKC', letter) for letter in non_binding_char] return not (character in normalized_non_binding_char) |
