lettering along path: fix baseline for scaled text (#3751)

pull/3754/head dev-build-claudine-add_gingo200_font
Kaalleen 2025-05-26 19:57:41 +02:00 zatwierdzone przez GitHub
rodzic a307363bd4
commit cc8809e55a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -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