diff options
| author | Jason Rumney | 2000-11-27 20:09:44 +0000 |
|---|---|---|
| committer | Jason Rumney | 2000-11-27 20:09:44 +0000 |
| commit | 5c6682bea05d9209f44ddc40e84c57b6ae3313c3 (patch) | |
| tree | dd22bd3f730fb9f069204cfd81e55447a460f704 /src | |
| parent | ae31f84d5cc18fbd4ff17e28621b60130137a0d8 (diff) | |
| download | emacs-5c6682bea05d9209f44ddc40e84c57b6ae3313c3.tar.gz emacs-5c6682bea05d9209f44ddc40e84c57b6ae3313c3.zip | |
(w32_load_system_font): Always mark font as double byte if codepage is unicode.
Diffstat (limited to 'src')
| -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) | |||
| 5537 | { | 5537 | { |
| 5538 | HDC hdc; | 5538 | HDC hdc; |
| 5539 | HANDLE oldobj; | 5539 | HANDLE oldobj; |
| 5540 | int codepage = w32_codepage_for_font (fontname); | ||
| 5540 | 5541 | ||
| 5541 | hdc = GetDC (dpyinfo->root_window); | 5542 | hdc = GetDC (dpyinfo->root_window); |
| 5542 | oldobj = SelectObject (hdc, font->hfont); | 5543 | oldobj = SelectObject (hdc, font->hfont); |
| 5544 | |||
| 5543 | ok = GetTextMetrics (hdc, &font->tm); | 5545 | ok = GetTextMetrics (hdc, &font->tm); |
| 5544 | font->double_byte_p = GetFontLanguageInfo(hdc) & GCP_DBCS; | 5546 | if (codepage == CP_UNICODE) |
| 5547 | font->double_byte_p = 1; | ||
| 5548 | else | ||
| 5549 | font->double_byte_p = GetFontLanguageInfo(hdc) & GCP_DBCS; | ||
| 5550 | |||
| 5545 | SelectObject (hdc, oldobj); | 5551 | SelectObject (hdc, oldobj); |
| 5546 | ReleaseDC (dpyinfo->root_window, hdc); | 5552 | ReleaseDC (dpyinfo->root_window, hdc); |
| 5547 | /* Fill out details in lf according to the font that was | 5553 | /* Fill out details in lf according to the font that was |