Skip to content

Commit

Permalink
Fix font weight definition in Fontconfig configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Jun 8, 2024
1 parent 3e87175 commit e9fed42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weasyprint/text/fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ def add_font_face(self, rule_descriptors, url_fetcher):
SubElement(edit, 'const').text = text
if 'font_weight' in rule_descriptors:
edit = SubElement(match, 'edit', name='weight', mode=mode)
text = FONTCONFIG_WEIGHT[rule_descriptors['font_weight']]
SubElement(edit, 'const').text = text
integer = FONTCONFIG_WEIGHT[rule_descriptors['font_weight']]
SubElement(edit, 'int').text = str(integer)
if 'font_stretch' in rule_descriptors:
edit = SubElement(match, 'edit', name='width', mode=mode)
text = FONTCONFIG_STRETCH[rule_descriptors['font_stretch']]
Expand Down

0 comments on commit e9fed42

Please sign in to comment.