Skip to content

Commit

Permalink
Include kerning in emojis positions
Browse files Browse the repository at this point in the history
Fix #1855.
  • Loading branch information
liZe committed Apr 7, 2023
1 parent 8a800a0 commit 4eb7fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weasyprint/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ def draw_first_line(stream, textbox, text_overflow, block_ellipsis, x, y,
f = f / font_size - font_size
emojis.append([image, font, a, d, x_advance, f])

x_advance += (font.widths[glyph] + offset) / 1000
x_advance += (font.widths[glyph] + offset - kerning) / 1000

# Close the last glyphs list, remove if empty
if string[-1] == '<':
Expand Down

0 comments on commit 4eb7fa3

Please sign in to comment.