Huw Davies : gdi32: Reset ppem to zero if we fail to find a matching height .

Alexandre Julliard julliard at winehq.org
Wed Aug 28 14:03:10 CDT 2013


Module: wine
Branch: master
Commit: d089ca67e3df8b930ebebb29dd9bf2a80ecda726
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d089ca67e3df8b930ebebb29dd9bf2a80ecda726

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Aug 28 14:21:12 2013 +0100

gdi32: Reset ppem to zero if we fail to find a matching height.

---

 dlls/gdi32/freetype.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 3f3b480..3d61ad1 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -4580,14 +4580,20 @@ static LONG load_VDMX(GdiFont *font, LONG height)
 	} else {
 	    ppem = -height;
 	    if(ppem < startsz || ppem > endsz)
-		goto end;
+            {
+                ppem = 0;
+                goto end;
+            }
 
 	    for(i = 0; i < recs; i++) {
 		USHORT yPelHeight;
 		yPelHeight = GET_BE_WORD(vTable[i * 3]);
 
 		if(yPelHeight > ppem)
-		    break; /* failed */
+                {
+                    ppem = 0;
+                    break; /* failed */
+                }
 
 		if(yPelHeight == ppem) {
 		    font->yMax = GET_BE_WORD(vTable[(i * 3) + 1]);




More information about the wine-cvs mailing list