From e4313ad92c813e1bb07fbe86365f77dc4fa7b850 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 15 Sep 2008 18:27:16 -0700 Subject: [PATCH] gdi32: Skip fonts with glyph width/height of 0. --- dlls/gdi32/freetype.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index dcd60e3..56ba3de 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5360,6 +5360,13 @@ static BOOL get_glyph_index_linked(GdiFont *font, UINT c, GdiFont **linked_font, g = get_glyph_index(child_font->font, c); if(g) { + FT_Int load_flags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; + FT_Face ft_face = child_font->font->ft_face; + if (pFT_Load_Glyph(ft_face, g, load_flags)) + continue; + if (ft_face->glyph->metrics.width == 0 || + ft_face->glyph->metrics.height == 0) + continue; *glyph = g; *linked_font = child_font->font; return TRUE; -- 1.5.4.5