Some cool changes surely
authorMikael Magnusson <mikachu@gmail.com>
Mon, 12 Mar 2018 14:02:16 +0000 (15:02 +0100)
committerMikael Magnusson <mikachu@gmail.com>
Mon, 12 Mar 2018 14:02:16 +0000 (15:02 +0100)
obrender/font.c
openbox/config.c

index 72933e0..72f191a 100644 (file)
@@ -113,7 +113,10 @@ RrFont *RrFontOpen(const RrInstance *inst, const gchar *name, gint size,
     pango_font_description_set_family(out->font_desc, name);
     pango_font_description_set_weight(out->font_desc, pweight);
     pango_font_description_set_style(out->font_desc, pstyle);
-    pango_font_description_set_size(out->font_desc, size * PANGO_SCALE);
+    if (size < 0)
+        pango_font_description_set_absolute_size(out->font_desc, -size * PANGO_SCALE);
+    else
+        pango_font_description_set_size(out->font_desc, size * PANGO_SCALE);
 
     /* setup the layout */
     pango_layout_set_font_description(out->layout, out->font_desc);
index e732011..58a1aa6 100644 (file)
@@ -761,7 +761,11 @@ static void parse_theme(xmlNodePtr node, gpointer d)
         }
         if ((fnode = obt_xml_find_node(n->children, "size"))) {
             int s = obt_xml_node_int(fnode);
-            if (s > 0) size = s;
+            if (s > 0) {
+                size = s;
+                if (obt_xml_attr_contains(fnode, "type", "absolute"))
+                    size = -size;
+            }
         }
         if ((fnode = obt_xml_find_node(n->children, "weight"))) {
             gchar *w = obt_xml_node_string(fnode);