From be8446588339ad3fb73dc4acc92766813abdfd41 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Tue, 25 Dec 2018 21:51:58 +0900 Subject: [PATCH] [FONT][WIN32SS] Follow-up of #1184 --- win32ss/gdi/ntgdi/freetype.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 85ad7ceb460..0bdc40719af 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -5813,10 +5813,13 @@ GreExtTextOutW( { glyph_index = get_glyph_index_flagged(face, String[i], ETO_GLYPH_INDEX, fuOptions); + // FIXME: Use FT_LOAD_BITMAP_METRICS_ONLY or cache. error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); if (error) { - DPRINT1("WARNING: Failed to load and render glyph! [index: %d]\n", glyph_index); + DPRINT1("Failed to load glyph! [index: %d]\n", glyph_index); + IntUnLockFreeType(); + goto Cleanup; } glyph = face->glyph; @@ -5828,6 +5831,8 @@ GreExtTextOutW( if (!realglyph) { DPRINT1("Failed to render glyph! [index: %d]\n", glyph_index); + IntUnLockFreeType(); + goto Cleanup; } /* retrieve kerning distance and move pen position */