gdi32: find_face_from_filename() needs to take font replacements into account.

This commit is contained in:
Kusanagi Kouichi 2012-03-14 21:01:49 +09:00 committed by Alexandre Julliard
parent cf7479ca85
commit 6a49adeee6
1 changed files with 11 additions and 9 deletions

View File

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