From: ellson Date: Fri, 23 May 2008 02:24:10 +0000 (+0000) Subject: check that font class is fontconfig based before looking for font path X-Git-Tag: LAST_LIBGRAPH~32^2~4010 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2b73f100860fdae7d690a9366dbbbc5f1054f6a;p=graphviz check that font class is fontconfig based before looking for font path --- diff --git a/plugin/pango/gvtextlayout_pango.c b/plugin/pango/gvtextlayout_pango.c index 812aec5f2..3674ac7b4 100644 --- a/plugin/pango/gvtextlayout_pango.c +++ b/plugin/pango/gvtextlayout_pango.c @@ -96,42 +96,36 @@ static boolean pango_textlayout(textpara_t * para, char **fontpath) if (psfnt) strcat(buf, "(ps) "); #ifdef HAVE_PANGO_FC_FONT_LOCK_FACE - if (strcmp(fontclass, "PangoCairoFcFont") == 0) -#else - if (false) -#endif - { + if (strcmp(fontclass, "PangoCairoFcFont") == 0) { FT_Face face; PangoFcFont *fcfont; FT_Stream stream; FT_StreamDesc streamdesc; fcfont = PANGO_FC_FONT(font); - if (fcfont) { - face = pango_fc_font_lock_face(fcfont); - if (face) { - strcat(buf, "\""); - strcat(buf, face->family_name); - strcat(buf, ", "); - strcat(buf, face->style_name); - strcat(buf, "\" "); + face = pango_fc_font_lock_face(fcfont); + if (face) { + strcat(buf, "\""); + strcat(buf, face->family_name); + strcat(buf, ", "); + strcat(buf, face->style_name); + strcat(buf, "\" "); - stream = face->stream; - if (stream) { - streamdesc = stream->pathname; - if (streamdesc.pointer) - strcat(buf, (char*)streamdesc.pointer); - else - strcat(buf, "*no pathname available*"); - } + stream = face->stream; + if (stream) { + streamdesc = stream->pathname; + if (streamdesc.pointer) + strcat(buf, (char*)streamdesc.pointer); else - strcat(buf, "*no stream available*"); + strcat(buf, "*no pathname available*"); } - pango_fc_font_unlock_face(fcfont); - } - else - strcat(buf, "*not using fontconfig*"); + else + strcat(buf, "*no stream available*"); + } + pango_fc_font_unlock_face(fcfont); } - else { + else +#endif + { PangoFontDescription *tdesc; char *tfont;