diff options
author | Jason Rumney <jasonr@gnu.org> | 2000-11-27 20:09:44 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2000-11-27 20:09:44 +0000 |
commit | 7dbac09913dda0c5d26eada13a83f9f4d9d6ffbc (patch) | |
tree | bafda8ba2ec898b788d112ce48c28f96ed64e0ee | |
parent | 2b72dd4a9e6bc01c746049b5949b62de0421badd (diff) | |
download | emacs-7dbac09913dda0c5d26eada13a83f9f4d9d6ffbc.tar.gz |
(w32_load_system_font): Always mark font as double byte if codepage is unicode.
-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 591a7543229..d6385204119 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5537,11 +5537,17 @@ w32_load_system_font (f,fontname,size) { HDC hdc; HANDLE oldobj; + int codepage = w32_codepage_for_font (fontname); hdc = GetDC (dpyinfo->root_window); oldobj = SelectObject (hdc, font->hfont); + ok = GetTextMetrics (hdc, &font->tm); - font->double_byte_p = GetFontLanguageInfo(hdc) & GCP_DBCS; + if (codepage == CP_UNICODE) + font->double_byte_p = 1; + else + font->double_byte_p = GetFontLanguageInfo(hdc) & GCP_DBCS; + SelectObject (hdc, oldobj); ReleaseDC (dpyinfo->root_window, hdc); /* Fill out details in lf according to the font that was |