From c2a88ec8df0a4fed1451641232399e28c4f73dbd Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 10 Jul 2012 15:17:42 +0200 Subject: [PATCH] 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. --- weasyprint/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weasyprint/text.py b/weasyprint/text.py index 3259063ef0..abd48e897e 100644 --- a/weasyprint/text.py +++ b/weasyprint/text.py @@ -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))