Index: base/applications/fontview/display.c =================================================================== --- base/applications/fontview/display.c (revision 57785) +++ base/applications/fontview/display.c (working copy) @@ -139,6 +139,24 @@ return y; } +static int CALLBACK EnumFontFamProcW( + ENUMLOGFONT *lpelf, + NEWTEXTMETRIC *lpntm, + int FontType, + LPARAM lParam) +{ + LPBOOL pfOpenType = (LPBOOL)lParam; + if (FontType & TRUETYPE_FONTTYPE) + { + if (lpntm->ntmFlags & (NTM_TT_OPENTYPE | NTM_PS_OPENTYPE)) + { + *pfOpenType = TRUE; + return FALSE; + } + } + return TRUE; +} + static LRESULT Display_SetTypeFace(HWND hwnd, PEXTLOGFONTW pExtLogFont) { @@ -163,13 +181,27 @@ pData->hCharSetFont = CreateFontIndirectW(&logfont); /* Get font format */ - // FIXME: Get the real font format (OpenType?) SelectObject(hDC, pData->hCharSetFont); GetTextMetrics(hDC, &tm); - if ((tm.tmPitchAndFamily & TMPF_TRUETYPE) == TMPF_TRUETYPE) + if (tm.tmPitchAndFamily & TMPF_TRUETYPE) { - swprintf(pData->szFormat, L" (TrueType)"); + BOOL fOpenType = FALSE; + EnumFontFamiliesW(hDC, logfont.lfFaceName, + (FONTENUMPROCW)EnumFontFamProcW, (LPARAM)&fOpenType); + + if (fOpenType) + swprintf(pData->szFormat, L" (OpenType)"); + else + swprintf(pData->szFormat, L" (TrueType)"); } + else if (tm.tmPitchAndFamily & TMPF_VECTOR) + { + swprintf(pData->szFormat, L" (Vector)"); + } + else + { + swprintf(pData->szFormat, L" (Raster)"); + } for (i = 0; i < MAX_SIZES; i++) {