diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-05-26 19:57:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-26 19:57:41 +0200 |
| commit | cc8809e55a0782f07ac7f2d428aa78653bcc9042 (patch) | |
| tree | 003d9a14db26d1f3ac4523eabe28bf153b2a406b /lib/extensions/lettering_along_path.py | |
| parent | a307363bd4d35c856770de01e4e755d127643b9c (diff) | |
lettering along path: fix baseline for scaled text (#3751)
Diffstat (limited to 'lib/extensions/lettering_along_path.py')
| -rw-r--r-- | lib/extensions/lettering_along_path.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/extensions/lettering_along_path.py b/lib/extensions/lettering_along_path.py index c5288693..d059bb14 100644 --- a/lib/extensions/lettering_along_path.py +++ b/lib/extensions/lettering_along_path.py @@ -120,9 +120,9 @@ class TextAlongPath: path = path.offset_curve(self.font.leading) def transform_glyphs(self, path, line): - line_bbox = line.bounding_box() - text_baseline = line_bbox.bottom - text_width = line_bbox.width + text_scale = Transform(f'scale({self.font_scale})') + text_width = line.bounding_box().width + text_baseline = line.bounding_box(text_scale).bottom if self.text_position == 'stretch': num_spaces = len(line) - 1 @@ -135,7 +135,6 @@ class TextAlongPath: stretch_space = 0 start_position = self.get_start_position(text_width, path.length) - text_scale = Transform(f'scale({self.font_scale})') distance = start_position old_bbox = None |
