Knowledge Base

BUG: WinCE GetDeviceCaps() Fails to Report TrueType Support

Article ID: 186224

Article Last Modified on 10/11/2002


APPLIES TO


This article was previously published under Q186224

SYMPTOMS

GetDeviceCaps() with TEXTCAPS always returns TC_RA_ABLE, which indicates that the operating system supports raster fonts. However, on some platforms, Windows CE supports TrueType fonts instead of raster fonts. GetDeviceCaps() does not report the appropriate flags on TrueType platforms.

RESOLUTION

To determine whether the operating system supports TrueType fonts, use the EnumFontFamilies() function. For example:
   int CALLBACK TTDetectionEnumerationProcedure( ENUMLOGFONT *lpelf,
      NEWTEXTMETRIC *lpntm, int FontType, LPARAM lParam )
   {
      if( FontType == TRUETYPE_FONTTYPE )
         *(BOOL *)lParam = TRUE;
      return TRUE;
   }
   BOOL DCSupportsTrueType( HDC hDC )
   {
      BOOL   bTT = FALSE;
      EnumFontFamilies( hDC, NULL,
         (FONTENUMPROC)TTDetectionEnumerationProcedure,
         (LPARAM)&bTT );
      return bTT;
   }
				

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Keywords: kbbug kbfont kbgdi KB186224