diff options
author | Andrew Innes <andrewi@gnu.org> | 2001-10-18 12:38:54 +0000 |
---|---|---|
committer | Andrew Innes <andrewi@gnu.org> | 2001-10-18 12:38:54 +0000 |
commit | 860294ca79f205a1578793ccb51ccd6cad7e36f4 (patch) | |
tree | a4a458428eb66230262913fba8b700d42f4b6919 | |
parent | b53b7731116ec8d1646bbd48874dfb391cd7b30c (diff) | |
download | emacs-860294ca79f205a1578793ccb51ccd6cad7e36f4.tar.gz |
(w32_load_system_font): Cache codepage in font_info.
-rw-r--r-- | src/w32fns.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 5173a25fe93..d9a23aa4031 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5585,6 +5585,7 @@ w32_load_system_font (f,fontname,size) struct font_info *fontp; LOGFONT lf; BOOL ok; + int codepage; int i; if (!fontname || !x_to_w32_font (fontname, &lf)) @@ -5616,7 +5617,8 @@ w32_load_system_font (f,fontname,size) { 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 @@ w32_load_system_font (f,fontname,size) 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)) |