]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_load_system_font): Always mark font as double byte if codepage is unicode.
authorJason Rumney <jasonr@gnu.org>
Mon, 27 Nov 2000 20:09:44 +0000 (20:09 +0000)
committerJason Rumney <jasonr@gnu.org>
Mon, 27 Nov 2000 20:09:44 +0000 (20:09 +0000)
src/w32fns.c

index 591a7543229eed9fca37f75650570043ef85bacc..d638520411945599a4c4776b34e9c76fa684b550 100644 (file)
@@ -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