Permalink
Browse files

Use bare commas without spaces for Pango.FontDescription.set_family

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 c2a88ec8df0a4fed1451641232399e28c4f73dbd
Showing with 1 addition and 1 deletion.
  1. +1 −1 weasyprint/text.py
View
@@ -49,7 +49,7 @@ def create_layout(text, style, hinting, max_width):
layout = PangoCairo.create_layout(
HINTED_DUMMY_CONTEXT if hinting else NON_HINTED_DUMMY_CONTEXT)
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_style(PANGO_STYLE[style.font_style])
font.set_absolute_size(Pango.units_from_double(style.font_size))

0 comments on commit c2a88ec

Please sign in to comment.