Nikolay Sivov : gdi32: Append "TrueType" suffix to registry key names.
Alexandre Julliard
julliard at winehq.org
Fri Oct 7 15:09:14 CDT 2016
Module: wine
Branch: stable
Commit: f1f6185e909a2c6fb76b359f2d7489df1474f07f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f1f6185e909a2c6fb76b359f2d7489df1474f07f
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Aug 14 23:52:16 2016 +0300
gdi32: Append "TrueType" suffix to registry key names.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit fcd0f6b0749b6827ee466a620e0198abe8a387f5)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/gdi32/freetype.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index b9d6768..47d44fe 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -3096,20 +3096,21 @@ static void update_reg_entries(void)
LIST_FOR_EACH_ENTRY( family, &font_list, Family, entry ) {
LIST_FOR_EACH_ENTRY( face, &family->faces, Face, entry ) {
char *buffer;
+ WCHAR *name;
+
if (!(face->flags & ADDFONT_EXTERNAL_FONT)) continue;
- if(face->FullName)
- {
- len = strlenW(face->FullName) + sizeof(TrueType) / sizeof(WCHAR) + 1;
- valueW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- strcpyW(valueW, face->FullName);
- }
- else
- {
- len = strlenW(family->FamilyName) + sizeof(TrueType) / sizeof(WCHAR) + 1;
- valueW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- strcpyW(valueW, family->FamilyName);
- }
+ name = face->FullName ? face->FullName : family->FamilyName;
+
+ len = strlenW(name) + 1;
+ if (face->scalable)
+ len += sizeof(TrueType) / sizeof(WCHAR);
+
+ valueW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ strcpyW(valueW, name);
+
+ if (face->scalable)
+ strcatW(valueW, TrueType);
buffer = strWtoA( CP_UNIXCP, face->file );
path = wine_get_dos_file_name( buffer );
More information about the wine-cvs
mailing list