Skip to content

Commit

Permalink
Fix SVG fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Dec 14, 2021
1 parent e61422e commit e1aee70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weasyprint/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,8 @@ def draw_first_line(stream, textbox, text_overflow, block_ellipsis, x, y):
hb_data = harfbuzz.hb_blob_get_data(hb_blob, stream.length)
if hb_data != ffi.NULL:
svg_data = ffi.unpack(hb_data, int(stream.length[0]))
image = SVGImage(svg_data, None, None, stream)
tree = ElementTree.fromstring(svg_data)
image = SVGImage(tree, None, None, stream)
a = d = font.widths[glyph] / 1000 / font.upem * font_size
emojis.append([image, font, a, d, x_advance, 0])
elif font.png:
Expand Down

0 comments on commit e1aee70

Please sign in to comment.