Nikolay Sivov : dwrite: Use system default locale when filling LOGFONT.lfFaceName.

Alexandre Julliard julliard at winehq.org
Wed Dec 7 15:20:30 CST 2016


Module: wine
Branch: master
Commit: bf23b8a529f5081a278c7beffc92648d6b63c87b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bf23b8a529f5081a278c7beffc92648d6b63c87b

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Dec  7 16:46:38 2016 +0300

dwrite: Use system default locale when filling LOGFONT.lfFaceName.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

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/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c
index 987eac9..ce4145e 100644
--- a/dlls/dwrite/tests/font.c
+++ b/dlls/dwrite/tests/font.c
@@ -3544,7 +3544,7 @@ static void get_logfont_from_font(IDWriteFont *font, LOGFONTW *logfont)
 
             /* Fallback to en-us if there's no string for user locale. */
             exists = FALSE;
-            if (GetUserDefaultLocaleName(localeW, sizeof(localeW)/sizeof(WCHAR)))
+            if (GetSystemDefaultLocaleName(localeW, sizeof(localeW)/sizeof(WCHAR)))
                 IDWriteLocalizedStrings_FindLocaleName(names, 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*);




More information about the wine-cvs mailing list