DEBUG((DBG_TYPE1, "(t1) %s: found `%s' (cached)\n",
name, info.fullfile));
/* this is a cached lookup */
- return xstrdup(info.fullfile);
+ return mdvi_strdup(info.fullfile);
}
/* no file associated to this font? */
/* get the `base' name */
if(ext) {
- newname = xstrdup(name);
+ newname = mdvi_strdup(name);
newname[ext - info.fontfile - 1] = 0;
} else
newname = (char *)name; /* we don't modify this */
/* we don't need this anymore */
if(newname != name)
- xfree(newname);
+ mdvi_free(newname);
if(filename == NULL) {
DEBUG((DBG_TYPE1, "(t1) %s: not found\n", name));
return NULL;
i = info->tfminfo->hic - info->tfminfo->loc + 1;
if(i != font->hic - font->loc + 1) {
/* reset to optimal size */
- font->chars = xrealloc(font->chars, i * sizeof(DviFontChar));
+ font->chars = mdvi_realloc(font->chars, i * sizeof(DviFontChar));
}
/* get the scaled characters metrics */
/* first destroy the private data */
t1_font_remove(info);
/* now reset all chars -- this is the important part */
- xfree(font->chars);
+ mdvi_free(font->chars);
font->chars = NULL;
font->loc = font->hic = 0;
return -1;
if(info->tfminfo)
free_font_metrics(info->tfminfo);
- /*xfree(info->fontname);*/
- xfree(info);
+ /*mdvi_free(info->fontname);*/
+ mdvi_free(info);
}
static void t1_free_data(DviFont *font)