Commit d089ca67 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

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

parent bb5aa886
...@@ -4580,14 +4580,20 @@ static LONG load_VDMX(GdiFont *font, LONG height) ...@@ -4580,14 +4580,20 @@ static LONG load_VDMX(GdiFont *font, LONG height)
} else { } else {
ppem = -height; ppem = -height;
if(ppem < startsz || ppem > endsz) if(ppem < startsz || ppem > endsz)
goto end; {
ppem = 0;
goto end;
}
for(i = 0; i < recs; i++) { for(i = 0; i < recs; i++) {
USHORT yPelHeight; USHORT yPelHeight;
yPelHeight = GET_BE_WORD(vTable[i * 3]); yPelHeight = GET_BE_WORD(vTable[i * 3]);
if(yPelHeight > ppem) if(yPelHeight > ppem)
break; /* failed */ {
ppem = 0;
break; /* failed */
}
if(yPelHeight == ppem) { if(yPelHeight == ppem) {
font->yMax = GET_BE_WORD(vTable[(i * 3) + 1]); font->yMax = GET_BE_WORD(vTable[(i * 3) + 1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment