1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 07:57:52 +03:00

Don’t draw emojis multiple times

This commit is contained in:
Guillaume Ayoub 2022-04-15 14:53:00 +02:00
parent 60edc7161f
commit ac176a8fd4

View File

@ -1020,12 +1020,11 @@ def draw_text(stream, textbox, offset_x, text_overflow, block_ellipsis):
def draw_emojis(stream, font_size, x, y, emojis):
for emoji in emojis:
for image, font, a, d, e, f in emojis:
stream.push_state()
stream.transform(a=a, d=d, e=x + e * font_size, f=y + f)
image.draw(stream, font_size, font_size, None)
stream.pop_state()
for image, font, a, d, e, f in emojis:
stream.push_state()
stream.transform(a=a, d=d, e=x + e * font_size, f=y + f)
image.draw(stream, font_size, font_size, None)
stream.pop_state()
def draw_first_line(stream, textbox, text_overflow, block_ellipsis, x, y,