diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 6a2fae1ed7..3653f1b032 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -1879,14 +1879,15 @@ FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI, Descent = pOS2->usWinDescent; } - if (FontGDI->Magic != FONTGDI_MAGIC) - { - IntRequestFontSize(NULL, FontGDI, 0, 0); - } - TM->tmAscent = FontGDI->tmAscent; - TM->tmDescent = FontGDI->tmDescent; +#if 0 /* This (Wine) code doesn't seem to work correctly for us, cmd issue */ + TM->tmAscent = (FT_MulFix(Ascent, YScale) + 32) >> 6; + TM->tmDescent = (FT_MulFix(Descent, YScale) + 32) >> 6; +#else /* This (ros) code was previously affected by a FreeType bug, but it works now */ + TM->tmAscent = (Face->size->metrics.ascender + 32) >> 6; /* Units above baseline */ + TM->tmDescent = (32 - Face->size->metrics.descender) >> 6; /* Units below baseline */ +#endif TM->tmHeight = TM->tmAscent + TM->tmDescent; - TM->tmInternalLeading = FontGDI->tmInternalLeading; + TM->tmInternalLeading = (FT_MulFix(Ascent + Descent - Face->units_per_EM, YScale) + 32) >> 6; /* MSDN says: * el = MAX(0, LineGap - ((WinAscent + WinDescent) - (Ascender - Descender)))