]> Dogcows Code - chaz/openbox/blobdiff - render/font.c
make the Unfocus action do something when config_focus_follow is set
[chaz/openbox] / render / font.c
index ee8ca4a39e818a8dd1dc124dc60d576dfe0c269d..b715bb80b076e4da150dbde4e4f99c3957b02ada 100644 (file)
@@ -129,8 +129,7 @@ static RrFont *openfont(const RrInstance *inst, gchar *fontstring)
 
     if (FcPatternGetInteger(match, "pixelsize", 0, &tmp_int) !=
             FcResultTypeMismatch) {
-        /* TODO: is PANGO_SCALE correct ?? */
-        pango_font_description_set_size(out->pango_font_description,
+        pango_font_description_set_absolute_size(out->pango_font_description,
                                         tmp_int*PANGO_SCALE);
     }
 
@@ -204,12 +203,12 @@ RrFont *RrFontOpen(const RrInstance *inst, gchar *fontstring)
 void RrFontClose(RrFont *f)
 {
     if (f) {
+#ifdef USE_PANGO
+        pango_font_description_free(f->pango_font_description);
+#endif
         XftFontClose(RrDisplay(f->inst), f->xftfont);
         g_free(f);
     }
-#ifdef USE_PANGO
-    pango_font_description_free(f->pango_font_description);
-#endif
 }
 
 static void font_measure_full(const RrFont *f, const gchar *str,
@@ -406,11 +405,10 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
                       t->font->xftfont->ascent + y,
                       (FcChar8*)text->str, l);
 #else /* USE_PANGO */
-    /* layout_line() bases y on the baseline, while
-     * layout() bases y on the top of the ink layout.
-     * We want the baseline to always be in the same place, thusly, we use
-     * layout_line()
-     * The actual line doesn't need to be freed */
+    /* layout_line() bases y on the baseline, while layout() bases y on the
+     * top of the ink layout. We want the baseline to always be in the same
+     * place, thusly, we use layout_line()
+     * The actual line doesn't need to be freed (per the pango docs) */
     pango_xft_render_layout_line(d, &c, pango_layout_get_line(pl, 0),
                                  x * PANGO_SCALE, y * PANGO_SCALE);
     g_object_unref(pl);
This page took 0.020625 seconds and 4 git commands to generate.