Skip to content

Commit fe2f0c6

Browse files
committed
Don’t crash with bitmap fonts with no "glyf" table
1 parent ff3b417 commit fe2f0c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

weasyprint/pdf/stream.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ def __init__(self, pango_font):
7373
else:
7474
self.bitmap = (
7575
'EBDT' in self.ttfont and
76-
'EBLC' in self.ttfont and
77-
not self.ttfont['glyf'].glyphs)
76+
'EBLC' in self.ttfont and (
77+
'glyf' not in self.ttfont or
78+
not self.ttfont['glyf'].glyphs))
7879

7980
# Various properties
8081
self.italic_angle = 0 # TODO: this should be different

0 commit comments

Comments
 (0)