Skip to content

Commit

Permalink
Fix font type of embedded fonts
Browse files Browse the repository at this point in the history
Fix #1357.
  • Loading branch information
liZe committed May 18, 2021
1 parent fd2901c commit 5005459
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions weasyprint/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ def write_pdf(self, target=None, zoom=1, attachments=None, finisher=None):
current_widths = pydyf.Array()
widths.append(current_widths)
current_widths.append(font.widths[i])
font_type = 'otf' if font.file_content[:4] == b'OTTO' else 'ttf'
font_descriptor = pydyf.Dictionary({
'Type': '/FontDescriptor',
'FontName': font.name,
Expand Down

0 comments on commit 5005459

Please sign in to comment.