Kusanagi Kouichi slash@ac.auone-net.jp writes:
@@ -962,6 +972,22 @@ static Family *find_family_from_any_name(const WCHAR *name) return NULL; }
+static Font *find_font_file(const char *file) +{
- if (file != NULL)
- {
Font *font;
LIST_FOR_EACH_ENTRY(font, &font_list, Font, entry)
{
if (font->file != NULL && strcmp(font->file, file) == 0)
return font;
}
- }
- return NULL;
+}
You can't compare files this way, different paths can point to the same file.
@@ -2927,7 +2988,8 @@ static BOOL get_fontdir( const char *unix_name, struct fontdir *fd ) DWORD type;
if (!ft_face) return FALSE;
- face = create_face( ft_face, 0, unix_name, NULL, 0, 0, FALSE );
- font.file = (char *)unix_name;
Don't do that.