Kusanagi Kouichi : gdi32: find_face_from_filename() needs to take font replacements into account.
Alexandre Julliard
julliard at winehq.org
Wed Mar 14 13:56:11 CDT 2012
Module: wine
Branch: master
Commit: 6a49adeee6f889913bc960ce3483d83a1d777ee5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a49adeee6f889913bc960ce3483d83a1d777ee5
Author: Kusanagi Kouichi <slash at ac.auone-net.jp>
Date: Wed Mar 14 21:01:49 2012 +0900
gdi32: find_face_from_filename() needs to take font replacements into account.
---
dlls/gdi32/freetype.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 4d4a37d..ec39814 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -890,6 +890,14 @@ static inline FT_Fixed FT_FixedFromFIXED(FIXED f)
}
+static const struct list *get_face_list_from_family(const Family *family)
+{
+ if (!list_empty(&family->faces))
+ return &family->faces;
+ else
+ return family->replacement;
+}
+
static Face *find_face_from_filename(const WCHAR *file_name, const WCHAR *face_name)
{
Family *family;
@@ -903,9 +911,11 @@ static Face *find_face_from_filename(const WCHAR *file_name, const WCHAR *face_n
LIST_FOR_EACH_ENTRY(family, &font_list, Family, entry)
{
+ const struct list *face_list;
if(face_name && strcmpiW(face_name, family->FamilyName))
continue;
- LIST_FOR_EACH_ENTRY(face, &family->faces, Face, entry)
+ face_list = get_face_list_from_family(family);
+ LIST_FOR_EACH_ENTRY(face, face_list, Face, entry)
{
if (!face->file)
continue;
@@ -1957,14 +1967,6 @@ static SYSTEM_LINKS *find_font_link(const WCHAR *name)
return NULL;
}
-static const struct list *get_face_list_from_family(const Family *family)
-{
- if (!list_empty(&family->faces))
- return &family->faces;
- else
- return family->replacement;
-}
-
static void populate_system_links(const WCHAR *name, const WCHAR *const *values)
{
const WCHAR *value;
More information about the wine-cvs
mailing list