From: Jason Rumney Date: Mon, 27 Nov 2000 20:09:44 +0000 (+0000) Subject: (w32_load_system_font): Always mark font as double byte if codepage is unicode. X-Git-Tag: emacs-pretest-21.0.92~34 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5c6682bea05d9209f44ddc40e84c57b6ae3313c3;p=emacs.git (w32_load_system_font): Always mark font as double byte if codepage is unicode. --- 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