+ out->font_desc = pango_font_description_new();
+ out->layout = pango_layout_new(inst->pango);
+
+ /* get the data from the parsed xft string */
+
+ /* get the family */
+ if (FcPatternGetString(pat, "family", 0,
+ (FcChar8**)&sval) == FcResultMatch)
+ pango_font_description_set_family(out->font_desc, sval);
+
+ /* get the weight */
+ if (FcPatternGetInteger(pat, "weight", 0, &ival) == FcResultMatch) {
+ if (ival == FC_WEIGHT_LIGHT)
+ pango_font_description_set_weight(out->font_desc,
+ PANGO_WEIGHT_LIGHT);
+ else if (ival == FC_WEIGHT_DEMIBOLD)
+ pango_font_description_set_weight(out->font_desc,
+ PANGO_WEIGHT_SEMIBOLD);
+ else if (ival == FC_WEIGHT_BOLD)
+ pango_font_description_set_weight(out->font_desc,
+ PANGO_WEIGHT_BOLD);
+ else if (ival == FC_WEIGHT_BLACK)
+ pango_font_description_set_weight(out->font_desc,
+ 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,
+ PANGO_STYLE_ITALIC);
+ else if (ival == FC_SLANT_OBLIQUE)
+ pango_font_description_set_style(out->font_desc,
+ PANGO_STYLE_OBLIQUE);
+ }