[PATCH] dwrite/tests: Do not assume that fonts have a en-us name.

Nikolay Sivov nsivov at codeweavers.com
Thu Mar 4 01:45:40 CST 2021



On 3/3/21 2:38 PM, Giovanni Mascellani wrote:
> Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
> ---
>  dlls/dwrite/tests/analyzer.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c
> index 6dd251270c7..0294bbfb719 100644
> --- a/dlls/dwrite/tests/analyzer.c
> +++ b/dlls/dwrite/tests/analyzer.c
> @@ -1500,7 +1500,10 @@ static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, unsig
>  
>      hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-us", &index, &exists);
>      ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
> -    ok(exists, "Failed to find locale name %d.\n", exists);
> +
> +    /* Not all fonts have an en-us name! */
> +    if (!exists)
> +        index = 0;
>  
>      hr = IDWriteLocalizedStrings_GetString(strings, index, buff, size);
>      ok(hr == S_OK, "Failed to get name string, hr %#x.\n", hr);
Do you know which font was that? I'd like to test that on Windows first,
it's possible locale-neutral or "en" entry is still created even when
not specified explicitly.



More information about the wine-devel mailing list