(w32_unload_font): Free per_char array if present.
return NULL;
font = (XFontStruct *) xmalloc (sizeof (XFontStruct));
+ bzero (font, sizeof (*font));
/* Set bdf to NULL to indicate that this is a Windows font. */
font->bdf = NULL;
? VARIABLE_PITCH : FIXED_PITCH);
lf.lfOutPrecision = ((font->tm.tmPitchAndFamily & TMPF_VECTOR)
? OUT_STROKE_PRECIS : OUT_STRING_PRECIS);
+
+ w32_cache_char_metrics (font);
}
UNBLOCK_INPUT;
{
if (font)
{
+ if (font->per_char) xfree (font->per_char);
if (font->bdf) w32_free_bdf_font (font->bdf);
if (font->hfont) DeleteObject(font->hfont);