From c567ad2f076407e83f37481def6ad7a719a115d5 Mon Sep 17 00:00:00 2001 From: David Tagatac <david@tagatac.net> Date: Mon, 20 Jan 2025 07:18:03 -0800 Subject: [PATCH] Align png emojis to the surrounding text --- weasyprint/draw/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weasyprint/draw/text.py b/weasyprint/draw/text.py index 84c1a1ef4..8bb2ad91a 100644 --- a/weasyprint/draw/text.py +++ b/weasyprint/draw/text.py @@ -235,7 +235,7 @@ def draw_first_line(stream, textbox, text_overflow, block_ellipsis, matrix): pango.pango_font_get_glyph_extents( pango_font, glyph, stream.ink_rect, stream.logical_rect) - f = -stream.logical_rect.y - stream.logical_rect.height + f = -stream.logical_rect.y f = f * FROM_UNITS / font_size - font_size emojis.append([image, font, a, d, x_advance, f])