[PATCH] dwrite: Use system default locale when filling LOGFONT.lfFaceName

Nikolay Sivov nsivov at codeweavers.com
Wed Dec 7 04:32:33 CST 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---

New failures on mixed locale box here http://test.winehq.org/data/fd8f32aa8e0c34b8960246c41915874ce6316f71/win7_fg-win7u64-1spie9-mx/dwrite:font.html.

 dlls/dwrite/opentype.c | 2 +-
 include/winnls.h       | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c
index 4a6d62c..c666275 100644
--- a/dlls/dwrite/opentype.c
+++ b/dlls/dwrite/opentype.c
@@ -1645,7 +1645,7 @@ HRESULT opentype_get_font_facename(struct file_stream_desc *stream_desc, WCHAR *
         BOOL exists;
 
         exists = FALSE;
-        if (GetUserDefaultLocaleName(localeW, sizeof(localeW)/sizeof(WCHAR)))
+        if (GetSystemDefaultLocaleName(localeW, sizeof(localeW)/sizeof(WCHAR)))
             IDWriteLocalizedStrings_FindLocaleName(lfnames, localeW, &index, &exists);
 
         if (!exists)
diff --git a/include/winnls.h b/include/winnls.h
index 35521fd..96f60de 100644
--- a/include/winnls.h
+++ b/include/winnls.h
@@ -915,6 +915,7 @@ WINBASEAPI BOOL        WINAPI GetStringTypeExA(LCID,DWORD,LPCSTR,INT,LPWORD);
 WINBASEAPI BOOL        WINAPI GetStringTypeExW(LCID,DWORD,LPCWSTR,INT,LPWORD);
 #define                       GetStringTypeEx WINELIB_NAME_AW(GetStringTypeEx)
 WINBASEAPI LANGID      WINAPI GetSystemDefaultLangID(void);
+WINBASEAPI INT         WINAPI GetSystemDefaultLocaleName(LPWSTR,int);
 WINBASEAPI LCID        WINAPI GetSystemDefaultLCID(void);
 WINBASEAPI LANGID      WINAPI GetSystemDefaultUILanguage(void);
 WINBASEAPI BOOL        WINAPI GetSystemPreferredUILanguages(DWORD,ULONG*,WCHAR*,ULONG*);
-- 
2.10.2




More information about the wine-patches mailing list