]> granicus.if.org Git - graphviz/commitdiff
partial improvement in fontconfig lookup of font found by pango
authorellson <devnull@localhost>
Thu, 6 Mar 2008 23:53:47 +0000 (23:53 +0000)
committerellson <devnull@localhost>
Thu, 6 Mar 2008 23:53:47 +0000 (23:53 +0000)
plugin/pango/gvtextlayout_pango.c

index 1e1cd144ce58538f8bb710c9fb3f0082e5ab9791..6b01477cb834025200f7c55009c7a0381546cefa 100644 (file)
@@ -112,7 +112,13 @@ static boolean pango_textlayout(textpara_t * para, char **fontpath)
             if (! FcInit())
                return FALSE;
     
-           pat = FcNameParse((FcChar8 *) tfont);
+//         pat = FcNameParse((FcChar8 *) tfont);
+           pat = FcPatternBuild (0,
+               FC_FAMILY, FcTypeString, pango_font_description_get_family(tdesc),
+//             FC_STYLE, FcTypeString, pango_font_description_get_style(tdesc),
+//             FC_WEIGHT, FcTypeString, pango_font_description_get_weight(tdesc),
+               (char *) 0);
+
            FcConfigSubstitute (0, pat, FcMatchPattern);
            FcDefaultSubstitute (pat);
            fs = FcFontSetCreate();