# HG changeset patch # User Andrew Innes # Date 972134985 0 # Node ID 0574ffc14f77676211035d6d6b73bb1beff0ac92 # Parent 8530cd0a74555e39fda1f2f3220d9b2d162dcfee (w32_load_system_font): Call w32_cache_char_metrics. (w32_unload_font): Free per_char array if present. diff -r 8530cd0a7455 -r 0574ffc14f77 src/w32fns.c --- a/src/w32fns.c Sat Oct 21 13:26:41 2000 +0000 +++ b/src/w32fns.c Sat Oct 21 13:29:45 2000 +0000 @@ -5430,6 +5430,7 @@ 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; @@ -5464,6 +5465,8 @@ ? VARIABLE_PITCH : FIXED_PITCH); lf.lfOutPrecision = ((font->tm.tmPitchAndFamily & TMPF_VECTOR) ? OUT_STROKE_PRECIS : OUT_STRING_PRECIS); + + w32_cache_char_metrics (font); } UNBLOCK_INPUT; @@ -5592,6 +5595,7 @@ { 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);