diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 2a2bde1b1ec..3f3b480d124 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4577,6 +4577,25 @@ static LONG load_VDMX(GdiFont *font, LONG height) ppem = 0; TRACE("ppem not found for height %d\n", height); } + } else { + ppem = -height; + if(ppem < startsz || ppem > endsz) + goto end; + + for(i = 0; i < recs; i++) { + USHORT yPelHeight; + yPelHeight = GET_BE_WORD(vTable[i * 3]); + + if(yPelHeight > ppem) + break; /* failed */ + + if(yPelHeight == ppem) { + font->yMax = GET_BE_WORD(vTable[(i * 3) + 1]); + font->yMin = GET_BE_WORD(vTable[(i * 3) + 2]); + TRACE("ppem %d found; yMax=%d yMin=%d\n", ppem, font->yMax, font->yMin); + break; + } + } } end: HeapFree(GetProcessHeap(), 0, vTable);