Skip to content

Commit e1aee70

Browse files
committed
Fix SVG fonts
1 parent e61422e commit e1aee70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

weasyprint/draw.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,8 @@ def draw_first_line(stream, textbox, text_overflow, block_ellipsis, x, y):
11771177
hb_data = harfbuzz.hb_blob_get_data(hb_blob, stream.length)
11781178
if hb_data != ffi.NULL:
11791179
svg_data = ffi.unpack(hb_data, int(stream.length[0]))
1180-
image = SVGImage(svg_data, None, None, stream)
1180+
tree = ElementTree.fromstring(svg_data)
1181+
image = SVGImage(tree, None, None, stream)
11811182
a = d = font.widths[glyph] / 1000 / font.upem * font_size
11821183
emojis.append([image, font, a, d, x_advance, 0])
11831184
elif font.png:

0 commit comments

Comments
 (0)