Mercurial > emacs
changeset 40009:f6ecf530f0a3
(w32_load_system_font): Cache codepage for font, in
font_info.charset field.
author | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Wed, 17 Oct 2001 17:47:56 +0000 |
parents | 4aaeaa3a8e3b |
children | 1a8e549e2f40 |
files | src/w32fns.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32fns.c Wed Oct 17 17:47:54 2001 +0000 +++ b/src/w32fns.c Wed Oct 17 17:47:56 2001 +0000 @@ -5585,6 +5585,7 @@ struct font_info *fontp; LOGFONT lf; BOOL ok; + int codepage; int i; if (!fontname || !x_to_w32_font (fontname, &lf)) @@ -5616,7 +5617,8 @@ { HDC hdc; HANDLE oldobj; - int codepage = w32_codepage_for_font (fontname); + + codepage = w32_codepage_for_font (fontname); hdc = GetDC (dpyinfo->root_window); oldobj = SelectObject (hdc, font->hfont); @@ -5692,6 +5694,10 @@ charset = xlfd_charset_of_font (fontname); + /* Cache the W32 codepage for a font. This makes w32_encode_char + (called for every glyph during redisplay) much faster. */ + fontp->codepage = codepage; + /* Work out the font's full name. */ full_name = (char *)xmalloc (100); if (full_name && w32_to_x_font (&lf, full_name, 100, charset))