--- a/ui/win32/toolkit.c Wed Oct 08 15:42:23 2025 +0200 +++ b/ui/win32/toolkit.c Wed Oct 08 15:54:33 2025 +0200 @@ -52,6 +52,8 @@ static ui_callback exit_func; void *exit_data; +static HFONT ui_font = NULL; + void ui_init(const char *appname, int argc, char **argv) { application_name = appname; @@ -66,6 +68,20 @@ InitCommonControlsEx(&icex); SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); + + NONCLIENTMETRICS ncm = { sizeof(ncm) }; + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, FALSE); + ui_font = CreateFontIndirect(&ncm.lfMessageFont); +} + +HFONT ui_win32_get_font(void) { + return ui_font; +} + +void ui_win32_set_ui_font(HWND control) { + if (ui_font) { + SendMessage(control, WM_SETFONT, (WPARAM)ui_font, TRUE); + } } const char* ui_appname() {