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 | 5c6682bea05d9209f44ddc40e84c57b6ae3313c3 (patch) | |
tree | dd22bd3f730fb9f069204cfd81e55447a460f704 | |
parent | ae31f84d5cc18fbd4ff17e28621b60130137a0d8 (diff) | |
download | emacs-5c6682bea05d9209f44ddc40e84c57b6ae3313c3.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 |