The font collection saves the facename, while is_font_installed_proc returns fullname. It can be a trouble to some fonts. For example, The font '맑은 고딕', which is the basic korean font in windows, has the fullname 'Malgun Gothic'. In that case, GdipCreateFontFamilyFromName failed even though the font was installed.
Signed-off-by: Dongwan Kim kdw6485@gmail.com --- dlls/gdiplus/font.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 44431ea2ac8..565089b722e 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -1581,6 +1581,7 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, HFONT hfont, old_hfont; struct font_metrics fm; int i; + const ENUMLOGFONTW *elfW = (const ENUMLOGFONTW*)lfw;
param->stat = Ok;
@@ -1655,7 +1656,7 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, family->installed = param->is_system; family->ref = 1;
- lstrcpyW(family->FamilyName, lfw->lfFaceName); + lstrcpynW(family->FamilyName, elfW->elfFullName, LF_FACESIZE);
fonts->FontFamilies[fonts->count++] = family;