diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2021-04-02 19:05:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-02 19:05:34 +0200 |
| commit | 8a696e1871fc4a75c51ba53433c55f4d240a81bb (patch) | |
| tree | eb0aba3e8c412f09cd6e0189e5e7005ddc0e142c /lib/lettering | |
| parent | 354759b6caa114a67b4598ca332b06bdb03971eb (diff) | |
Lettering: ability to force letter case (#1113)
Diffstat (limited to 'lib/lettering')
| -rw-r--r-- | lib/lettering/font.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/lettering/font.py b/lib/lettering/font.py index b1979067..b47e35c4 100644 --- a/lib/lettering/font.py +++ b/lib/lettering/font.py @@ -106,6 +106,7 @@ class Font(object): name = localized_font_metadata('name', '') description = localized_font_metadata('description', '') + letter_case = font_metadata('letter_case', '') default_glyph = font_metadata('defalt_glyph', "�") leading = font_metadata('leading', 100) kerning_pairs = font_metadata('kerning_pairs', {}) @@ -229,6 +230,11 @@ class Font(object): last_character = None for character in line: + if self.letter_case == "upper": + character = character.upper() + elif self.letter_case == "lower": + character = character.lower() + if character == " ": position.x += self.word_spacing last_character = None |
