From a0433db1f36f553bccfc89f93aa72d826e790440 Mon Sep 17 00:00:00 2001 From: Claudine Peyrat <88194877+claudinepeyrat06@users.noreply.github.com> Date: Fri, 14 Feb 2025 20:23:08 +0100 Subject: fix broken forced case (#3509) --- lib/lettering/font.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/lettering/font.py') 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 -- cgit v1.2.3