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);
}
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);