Skip to content

Commit

Permalink
Don’t crash with bitmap fonts with no "glyf" table
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Oct 16, 2023
1 parent ff3b417 commit fe2f0c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions weasyprint/pdf/stream.py
Expand Up @@ -73,8 +73,9 @@ def __init__(self, pango_font):
else:
self.bitmap = (
'EBDT' in self.ttfont and
'EBLC' in self.ttfont and
not self.ttfont['glyf'].glyphs)
'EBLC' in self.ttfont and (
'glyf' not in self.ttfont or
not self.ttfont['glyf'].glyphs))

# Various properties
self.italic_angle = 0 # TODO: this should be different
Expand Down

0 comments on commit fe2f0c6

Please sign in to comment.