diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index b5ae335eab..5e323e4152 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -4441,8 +4441,23 @@ TextIntGetTextExtentPoint(PDC dc, String++; } ASSERT(FontGDI->Magic == FONTGDI_MAGIC); - ascender = FontGDI->tmAscent; /* Units above baseline */ - descender = FontGDI->tmDescent; /* Units below baseline */ + + if ((wcscmp(plf->lfFaceName, L"Tahoma") == 0) || + (wcscmp(plf->lfFaceName, L"Lucida Console") == 0) || + (wcscmp(plf->lfFaceName, L"Arial") == 0) || + (wcscmp(plf->lfFaceName, L"Times New Roman") == 0) || + (wcscmp(plf->lfFaceName, L"MS Shell Dlg") == 0) || + (wcscmp(plf->lfFaceName, L"System") == 0)) + { + ascender = (face->size->metrics.ascender + 32) >> 6; /* Old Units above baseline */ + descender = (32 - face->size->metrics.descender) >> 6; /* Units below baseline */ + } + else + { + ascender = FontGDI->tmAscent; /* New Units above baseline */ + descender = FontGDI->tmDescent; /* New Units below baseline */ + } + IntUnLockFreeType(); Size->cx = (TotalWidth64 + 32) >> 6;