Author: greatlrd Date: Tue Jul 10 21:44:23 2007 New Revision: 27568
URL: http://svn.reactos.org/svn/reactos?rev=27568&view=rev Log: patch from Yaroslav Ponomarenko yarryp at gmail dot com NtGdiExtTextOut did try render no existed glyth in the glyth cache
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c Tue Jul 10 21:44:23 2007 @@ -1872,15 +1872,22 @@ if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))) { - error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); - if (error) - { - DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index); - } - - glyph = face->glyph; - realglyph = NtGdiGlyphCacheSet(face, glyph_index, - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph, RenderMode); + error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); + if (error) + { + DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index); + } + + glyph = face->glyph; + realglyph = NtGdiGlyphCacheSet(face, glyph_index, + TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph, RenderMode); + if (!realglyph) + { + DPRINT1("Failed to render glyph! [index: %u]\n", glyph_index); + IntUnLockFreeType; + goto fail; + } + } /* retrieve kerning distance */ if (use_kerning && previous && glyph_index) @@ -1927,10 +1934,9 @@ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))) { error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); - if (error) { - DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index); + DPRINT1("Failed to load and render glyph! [index: %u]\n", glyph_index); IntUnLockFreeType; goto fail; } @@ -1940,6 +1946,12 @@ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph, RenderMode); + if (!realglyph) + { + DPRINT1("Failed to render glyph! [index: %u]\n", glyph_index); + IntUnLockFreeType; + goto fail; + } } // DbgPrint("realglyph: %x\n", realglyph); // DbgPrint("TextLeft: %d\n", TextLeft);