Skip to content

Commit

Permalink
Use bare commas without spaces for Pango.FontDescription.set_family
Browse files Browse the repository at this point in the history
Fix a pontential bug reported by Peter Moulder

pjrm: In text.py's call to set_family, note that it's safer
to use ','.join (i.e. without a space).  Some versions of
pango (possibly including the current one) have a bug in
some of the places where a family list is parsed, but using
a plain comma (without space) fixes that.
  • Loading branch information
SimonSapin committed Jul 10, 2012
1 parent 925669d commit c2a88ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weasyprint/text.py
Expand Up @@ -49,7 +49,7 @@ def create_layout(text, style, hinting, max_width):
layout = PangoCairo.create_layout( layout = PangoCairo.create_layout(
HINTED_DUMMY_CONTEXT if hinting else NON_HINTED_DUMMY_CONTEXT) HINTED_DUMMY_CONTEXT if hinting else NON_HINTED_DUMMY_CONTEXT)
font = Pango.FontDescription() font = Pango.FontDescription()
font.set_family(', '.join(style.font_family)) font.set_family(','.join(style.font_family))
font.set_variant(PANGO_VARIANT[style.font_variant]) font.set_variant(PANGO_VARIANT[style.font_variant])
font.set_style(PANGO_STYLE[style.font_style]) font.set_style(PANGO_STYLE[style.font_style])
font.set_absolute_size(Pango.units_from_double(style.font_size)) font.set_absolute_size(Pango.units_from_double(style.font_size))
Expand Down

0 comments on commit c2a88ec

Please sign in to comment.