]> Dogcows Code - chaz/openbox/blobdiff - render/font.c
use font 8point by default if none is specified
[chaz/openbox] / render / font.c
index a88df51f8ae96027000547be8bd08af6a38fb0ef..a63c8ca502fd7accea6d4fc8227b0b4bafab53c4 100644 (file)
@@ -116,6 +116,7 @@ static RrFont *openfont(const RrInstance *inst, gchar *fontstring)
                                               PANGO_WEIGHT_ULTRABOLD);
     }
 
+    /* get the style/slant */
     if (FcPatternGetInteger(pat, "slant", 0, &ival) == FcResultMatch) {
         if (ival == FC_SLANT_ITALIC)
             pango_font_description_set_style(out->font_desc,
@@ -131,6 +132,8 @@ static RrFont *openfont(const RrInstance *inst, gchar *fontstring)
     else if (FcPatternGetInteger(pat, "pixelsize", 0, &ival) == FcResultMatch)
         pango_font_description_set_absolute_size(out->font_desc,
                                                  ival * PANGO_SCALE);
+    else
+        pango_font_description_set_size(out->font_desc, 8 * PANGO_SCALE);
 
     if (FcPatternGetBool(pat, OB_SHADOW, 0, &out->shadow) != FcResultMatch)
         out->shadow = FALSE;
This page took 0.020331 seconds and 4 git commands to generate.