diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 9412df2f02..2587d99450 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -6578,7 +6578,9 @@ static BOOL get_outline_text_metrics(GdiFont *font) } lenface = (strlenW(face_nameW) + 1) * sizeof(WCHAR); - full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, GetSystemDefaultLangID() ); + if (!full_nameW) + full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, TT_MS_LANGID_ENGLISH_UNITED_STATES ); if (!full_nameW) { WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 0c67fe74a6..3b79bd0514 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4147,7 +4147,12 @@ static void test_fullname2_helper(const char *Family) bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size, GetSystemDefaultLangID()); + if (!ret) + { + trace("no localized UNIQUE_ID found.\n"); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + } ok(ret, "UNIQUE_ID (full name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFullName;