summaryrefslogtreecommitdiff
path: root/pango/pangoxft-fontmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangoxft-fontmap.c')
-rw-r--r--pango/pangoxft-fontmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index 7a15e49b..a033268c 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -354,11 +354,19 @@ pango_xft_font_map_default_substitute (PangoFcFontMap *fcfontmap,
FcPattern *pattern)
{
PangoXftFontMap *xftfontmap = PANGO_XFT_FONT_MAP (fcfontmap);
+ double d;
FcConfigSubstitute (NULL, pattern, FcMatchPattern);
if (xftfontmap->substitute_func)
xftfontmap->substitute_func (pattern, xftfontmap->substitute_data);
XftDefaultSubstitute (xftfontmap->display, xftfontmap->screen, pattern);
+ if (FcPatternGetDouble (pattern, FC_PIXEL_SIZE, 0, &d) == FcResultMatch && d == 0.0)
+ {
+ FcValue v;
+ v.type = FcTypeDouble;
+ v.u.d = 1.0;
+ FcPatternAdd (pattern, FC_PIXEL_SIZE, v, FcFalse);
+ }
}
static PangoFcFont *