BUG: WinCE GetDeviceCaps() Fails to Report TrueType Support (186224)



The information in this article applies to:

  • Microsoft Windows CE 2.0 for the Handheld PC

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.

Modification Type:MajorLast Reviewed:10/11/2002
Keywords:kbbug kbFont kbGDI KB186224