PangoAttrList *attrs;
GError *error = NULL;
#endif
- char *text, *tfnt, *pos;
+ char *text;
double textlayout_scale;
if (!context) {
else
fnt = fontname;
- /* suppress any extents - like in FreeSans.ttf (doxygen backwards compat) */
- tfnt = strdup(fnt);
- if ((pos = strrchr(tfnt, '.')))
- *pos = '\0';
-
- desc = pango_font_description_from_string(tfnt);
+ desc = pango_font_description_from_string(fnt);
if (fontpath) { /* -v support */
#ifdef HAVE_FONTCONFIG
FcFontSet *fs;
FcResult result;
- if (! FcInit()) {
- free(tfnt);
+ if (! FcInit())
return FALSE;
- }
- pat = FcNameParse((FcChar8 *) tfnt);
+ pat = FcNameParse((FcChar8 *) fnt);
FcConfigSubstitute (0, pat, FcMatchPattern);
FcDefaultSubstitute (pat);
fs = FcFontSetCreate();
*fontpath = fnt;
#endif
}
- free(tfnt);
}
/* all text layout is done at a scale of 96ppi */
pango_font_description_set_size (desc, (gint)(para->fontsize * PANGO_SCALE));