aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Innes2000-10-21 13:29:45 +0000
committerAndrew Innes2000-10-21 13:29:45 +0000
commitc6be38602145fbc6a7813c3cb073723a8dd55968 (patch)
tree3d03c86fa64c188f8f7a14c53e5b6600359f7e73 /src
parent82f9d56522a44d7f32a092873d55b5d1cfb3e4ad (diff)
downloademacs-c6be38602145fbc6a7813c3cb073723a8dd55968.tar.gz
emacs-c6be38602145fbc6a7813c3cb073723a8dd55968.zip
(w32_load_system_font): Call w32_cache_char_metrics.
(w32_unload_font): Free per_char array if present.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index d25b4b16abd..d394fb3b81a 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5430,6 +5430,7 @@ w32_load_system_font (f,fontname,size)
5430 return NULL; 5430 return NULL;
5431 5431
5432 font = (XFontStruct *) xmalloc (sizeof (XFontStruct)); 5432 font = (XFontStruct *) xmalloc (sizeof (XFontStruct));
5433 bzero (font, sizeof (*font));
5433 5434
5434 /* Set bdf to NULL to indicate that this is a Windows font. */ 5435 /* Set bdf to NULL to indicate that this is a Windows font. */
5435 font->bdf = NULL; 5436 font->bdf = NULL;
@@ -5464,6 +5465,8 @@ w32_load_system_font (f,fontname,size)
5464 ? VARIABLE_PITCH : FIXED_PITCH); 5465 ? VARIABLE_PITCH : FIXED_PITCH);
5465 lf.lfOutPrecision = ((font->tm.tmPitchAndFamily & TMPF_VECTOR) 5466 lf.lfOutPrecision = ((font->tm.tmPitchAndFamily & TMPF_VECTOR)
5466 ? OUT_STROKE_PRECIS : OUT_STRING_PRECIS); 5467 ? OUT_STROKE_PRECIS : OUT_STRING_PRECIS);
5468
5469 w32_cache_char_metrics (font);
5467 } 5470 }
5468 5471
5469 UNBLOCK_INPUT; 5472 UNBLOCK_INPUT;
@@ -5592,6 +5595,7 @@ w32_unload_font (dpyinfo, font)
5592{ 5595{
5593 if (font) 5596 if (font)
5594 { 5597 {
5598 if (font->per_char) xfree (font->per_char);
5595 if (font->bdf) w32_free_bdf_font (font->bdf); 5599 if (font->bdf) w32_free_bdf_font (font->bdf);
5596 5600
5597 if (font->hfont) DeleteObject(font->hfont); 5601 if (font->hfont) DeleteObject(font->hfont);