gdi32: Fixed localized font full name (UNIQUE ID).

This commit is contained in:
Qian Hong 2012-09-12 21:42:04 +08:00 committed by Alexandre Julliard
parent dadc409bae
commit 6c1e264e8e
2 changed files with 9 additions and 2 deletions

View File

@ -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};

View File

@ -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;