I have investigated `GdipGetGenericFontFamily*` functions from native gdiplus.dll.
The result of investigation * GdipGetGenericFontFamilySansSerif: is taking first `"Microsoft Sans Serif"` font, then `Arial` [(here is the comparison)](http://www.identifont.com/differences?first=Microsoft+Sans+Serif&second=...). The replacement for Arial is `"Liberation Sans"`. [(here is the comparison)](http://www.identifont.com/differences?first=Liberation+Sans&second=Arial...). If these fonts are not found then [`Tahoma` is taken.](http://www.identifont.com/differences?first=Liberation+Sans&second=Tahom...)
* GdipGetGenericFontFamilySerif: If `"Times New Roman"` is not found, then the fonts from `GdipGetGenericFontFamilySansSerif` is taken. * GdipGetGenericFontFamilyMonospace: If `"Courier New"` is not found, then the fonts from `GdipGetGenericFontFamilySansSerif` is taken.
More information about Free Fonts: https://en.wikipedia.org/wiki/Liberation_fonts
From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/font.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index bcf36a60090..1f9fdfe0542 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -969,19 +969,22 @@ GpStatus WINGDIPAPI GdipIsStyleAvailable(GDIPCONST GpFontFamily* family, /***************************************************************************** * GdipGetGenericFontFamilyMonospace [GDIPLUS.@] * - * Obtains a serif family (Courier New on Windows) + * Obtains a monospace family (Courier New on Windows) * * PARAMS - * **nativeFamily [I] Where the font will be stored + * **nativeFamily [O] Where the font will be stored * * RETURNS * InvalidParameter if nativeFamily is NULL. + * FontFamilyNotFound if unable to get font. * Ok otherwise. */ GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily) { GpStatus stat;
+ TRACE("(%p)\n", nativeFamily); + if (nativeFamily == NULL) return InvalidParameter;
stat = GdipCreateFontFamilyFromName(L"Courier New", NULL, nativeFamily); @@ -990,7 +993,7 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamil stat = GdipCreateFontFamilyFromName(L"Liberation Mono", NULL, nativeFamily);
if (stat == FontFamilyNotFound) - ERR("Missing 'Courier New' font\n"); + stat = GdipGetGenericFontFamilySansSerif(nativeFamily);
return stat; } @@ -1001,10 +1004,11 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamil * Obtains a serif family (Times New Roman on Windows) * * PARAMS - * **nativeFamily [I] Where the font will be stored + * **nativeFamily [O] Where the font will be stored * * RETURNS * InvalidParameter if nativeFamily is NULL. + * FontFamilyNotFound if unable to get font. * Ok otherwise. */ GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily) @@ -1018,10 +1022,11 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily) stat = GdipCreateFontFamilyFromName(L"Times New Roman", NULL, nativeFamily);
if (stat == FontFamilyNotFound) + // Liberation Serif is free replacement of Times New Roman font stat = GdipCreateFontFamilyFromName(L"Liberation Serif", NULL, nativeFamily);
if (stat == FontFamilyNotFound) - ERR("Missing 'Times New Roman' font\n"); + stat = GdipGetGenericFontFamilySansSerif(nativeFamily);
return stat; } @@ -1029,13 +1034,14 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily) /***************************************************************************** * GdipGetGenericFontFamilySansSerif [GDIPLUS.@] * - * Obtains a serif family (Microsoft Sans Serif on Windows) + * Obtains a sans serif family (Microsoft Sans Serif or Arial on Windows) * * PARAMS - * **nativeFamily [I] Where the font will be stored + * **nativeFamily [O] Where the font will be stored * * RETURNS * InvalidParameter if nativeFamily is NULL. + * FontFamilyNotFound if unable to get font. * Ok otherwise. */ GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily) @@ -1049,7 +1055,13 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamil stat = GdipCreateFontFamilyFromName(L"Microsoft Sans Serif", NULL, nativeFamily);
if (stat == FontFamilyNotFound) - /* FIXME: Microsoft Sans Serif is not installed on Wine. */ + stat = GdipCreateFontFamilyFromName(L"Arial", NULL, nativeFamily); + + if (stat == FontFamilyNotFound) + // Liberation Sans is free replacement of Arial font + stat = GdipCreateFontFamilyFromName(L"Liberation Sans", NULL, nativeFamily); + + if (stat == FontFamilyNotFound) stat = GdipCreateFontFamilyFromName(L"Tahoma", NULL, nativeFamily);
return stat;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=132809
Your paranoid android.
=== debian11 (32 bit report) ===
winhttp: notification.c:118: Test failed: 994: expected status 0x20000 got 0x4000 notification.c:118: Test failed: 994: expected status 0x20000 got 0x1 notification.c:123: Test failed: 994: expected callback 0x1 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x2 notification.c:123: Test failed: 994: expected callback 0x2 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x4 notification.c:123: Test failed: 994: expected callback 0x4 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x8 notification.c:123: Test failed: 994: expected callback 0x8 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x10 notification.c:123: Test failed: 994: expected callback 0x10 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x20 notification.c:123: Test failed: 994: expected callback 0x20 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x40 notification.c:123: Test failed: 994: expected callback 0x40 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x80 notification.c:123: Test failed: 994: expected callback 0x80 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x4000 notification.c:123: Test failed: 994: expected callback 0x4000 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x10 notification.c:123: Test failed: 994: expected callback 0x10 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x20 notification.c:123: Test failed: 994: expected callback 0x20 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x40 notification.c:123: Test failed: 994: expected callback 0x40 to be called from the same thread notification.c:118: Test failed: 994: expected status 0x20000 got 0x80 notification.c:123: Test failed: 994: expected callback 0x80 to be called from the same thread notification.c:123: Test failed: 994: expected callback 0x20000 to be called from the same thread notification.c:1174: Test failed: got 400 notification.c:118: Test failed: 1181: expected status 0x80000 got 0x200000 notification: Timeout winhttp.c:3543: Test failed: got 8 winhttp.c:3549: Test failed: got 12019 winhttp.c:3550: Test failed: got 3735928559 Unhandled exception: page fault on write access to 0x00000008 in 32-bit code (0x63c04786).
ws2_32: protocol.c:2476: Test succeeded inside todo block: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 0: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 1: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 2: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 3: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 4: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 5: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 12: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 13: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 14: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 15: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 16: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 28: IPv6 address is returned. protocol.c:2494: Test succeeded inside todo block: Test 29: IPv6 address is returned.