Skip to content

Commit

Permalink
Merge pull request #1989 from Kozea/bitmap
Browse files Browse the repository at this point in the history
Don’t crash with bitmap fonts with no "glyf" table
  • Loading branch information
liZe committed Oct 16, 2023
2 parents 23cfc77 + fe2f0c6 commit 8bccb7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions weasyprint/pdf/stream.py
Original file line number Diff line number Diff line change
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 8bccb7f

Please sign in to comment.