From cc8809e55a0782f07ac7f2d428aa78653bcc9042 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 26 May 2025 19:57:41 +0200 Subject: lettering along path: fix baseline for scaled text (#3751) --- lib/extensions/lettering_along_path.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/extensions/lettering_along_path.py') 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 -- cgit v1.2.3