Commit cb80a250 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user32: Return DEFAULT_CHARSET from SPI_GETICONTITLELOGFONT and SPI_GETNONCLIENTMETRICS.

parent f4fd21e3
......@@ -4151,14 +4151,13 @@ static void test_LOGFONT_charset(void)
ret = SystemParametersInfoA(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, FALSE);
ok(ret, "SystemParametersInfoW error %lu\n", GetLastError());
todo_wine
ok(lf.lfCharSet == DEFAULT_CHARSET, "got %d\n", lf.lfCharSet);
ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSA, iPaddedBorderWidth);
ret = SystemParametersInfoA(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
ok(ret, "SystemParametersInfoW error %lu\n", GetLastError());
todo_wine
ok(ncm.lfCaptionFont.lfCharSet == DEFAULT_CHARSET, "got %d\n", ncm.lfCaptionFont.lfCharSet);
ok(ncm.lfSmCaptionFont.lfCharSet == DEFAULT_CHARSET, "got %d\n", ncm.lfSmCaptionFont.lfCharSet);
}
START_TEST(sysparams)
......
......@@ -4247,12 +4247,14 @@ static BOOL get_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
switch (load_entry( &entry->hdr, &font, sizeof(font) ))
{
case sizeof(font):
font.lfCharSet = DEFAULT_CHARSET;
if (font.lfHeight > 0) /* positive height value means points ( inch/72 ) */
font.lfHeight = -muldiv( font.lfHeight, USER_DEFAULT_SCREEN_DPI, 72 );
entry->font.val = font;
break;
case sizeof(LOGFONT16): /* win9x-winME format */
logfont16to32( (LOGFONT16 *)&font, &entry->font.val );
entry->font.val.lfCharSet = DEFAULT_CHARSET;
if (entry->font.val.lfHeight > 0)
entry->font.val.lfHeight = -muldiv( entry->font.val.lfHeight, USER_DEFAULT_SCREEN_DPI, 72 );
break;
......@@ -4263,6 +4265,7 @@ static BOOL get_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
/* fall through */
case 0: /* use the default GUI font */
NtGdiExtGetObjectW( GetStockObject( DEFAULT_GUI_FONT ), sizeof(font), &font );
font.lfCharSet = DEFAULT_CHARSET;
font.lfHeight = map_from_system_dpi( font.lfHeight );
font.lfWeight = entry->font.weight;
entry->font.val = font;
......@@ -4302,6 +4305,7 @@ static BOOL set_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
static BOOL init_font_entry( union sysparam_all_entry *entry )
{
NtGdiExtGetObjectW( GetStockObject( DEFAULT_GUI_FONT ), sizeof(entry->font.val), &entry->font.val );
entry->font.val.lfCharSet = DEFAULT_CHARSET;
entry->font.val.lfHeight = map_from_system_dpi( entry->font.val.lfHeight );
entry->font.val.lfWeight = entry->font.weight;
get_real_fontname( &entry->font.val, entry->font.fullname );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment