diff options
author | Ken Takata <kentkt@csc.jp> | 2024-01-12 18:09:43 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-01-12 18:12:04 +0100 |
commit | d8cb1ddab7b8cb19267a8877d62bbe3a06626fa2 (patch) | |
tree | 231e859cdcc144638abbe5b51925f5c52ada8928 /src/gui_w32.c | |
parent | dc4c37b9d5130c777b377287b8b38cd24da084cb (diff) |
patch 9.1.0026: win32: Windows default font lackingv9.1.0026
Problem: win32: Windows default font lacking (@clach04)
Solution: Improve default font (Ken Takata)
win32: Improve default font
Currently, Fixedsys is the default font on Windows.
It is not suitable for recent High DPI environments.
* Change the default font to Consolas.
* Allow to change the default font by the translation message. E.g.:
```
msgid "DefaultFontNameForWindows"
msgstr "Courier New"
```
fixes: #12919
closes: #13266
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index eb4c841388..0935ecfd12 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -392,16 +392,6 @@ static int (WINAPI *pGetSystemMetricsForDpi)(int, UINT) = NULL; static DPI_AWARENESS_CONTEXT (WINAPI *pSetThreadDpiAwarenessContext)(DPI_AWARENESS_CONTEXT dpiContext) = NULL; static DPI_AWARENESS (WINAPI *pGetAwarenessFromDpiAwarenessContext)(DPI_AWARENESS_CONTEXT) = NULL; - static UINT WINAPI -stubGetDpiForSystem(void) -{ - HWND hwnd = GetDesktopWindow(); - HDC hdc = GetWindowDC(hwnd); - UINT dpi = GetDeviceCaps(hdc, LOGPIXELSY); - ReleaseDC(hwnd, hdc); - return dpi; -} - static int WINAPI stubGetSystemMetricsForDpi(int nIndex, UINT dpi UNUSED) { @@ -5286,7 +5276,7 @@ load_dpi_func(void) fail: // Disable PerMonitorV2 APIs. - pGetDpiForSystem = stubGetDpiForSystem; + pGetDpiForSystem = vimGetDpiForSystem; pGetDpiForWindow = NULL; pGetSystemMetricsForDpi = stubGetSystemMetricsForDpi; pSetThreadDpiAwarenessContext = NULL; |