The following information is provided as is, and the authors take no responsibility for the correctness.

Fonts

Information about fonts under Windows.

Windows Supports several different font technologies:

  • Raster
  • Vector
  • TrueType / OpenType

t2embapi.h and fontsub.h

Microsoft provides font embedding support dll's with all it operating systems “t2embapi.dll” and “fontsub.dll”.

The library i described in the Platform SDK documentation, but the required header files “t2embapi.h” “fontsub.h” were never provided. These files will be included in future versions of the Windows SDK. Until the SDK inludes these files, you can use the following copy, which was provided in a post in the Microsoft managed newsgroups:

fontembd.zip

GetFontResourceInfo

BOOL GetFontResourceInfo(
  LPCTSTR lpszFilename, // font file name
  LPDWORD cbBuffer,     // size of buffer for resouce information
  LPVOID lpvBuffer,     // buffer for returned resouce information
  DWORD dwType,         // resouce information type
);

See full description here: GetFontResourceInfo

Tips & Fixes

GDI Font Installation and Printing

Important hints about Font name collision and Life time of fonts
in this blog post by Feng Yuan

GetGlyphIndices returns invalid index non existing glyphs

Problem:
Sometimes GetGlyphIndices is returning a value other than 0xFFFF for characters that the fonts do not contain.

For example, GetGlyphIndices reports wrongly that MS San Serif contains a glyph at index 0x1F for Unicode codepoints U235E, U2339,and U2352. This font does however not contain glyphs for these characters.

Cause:
This is a bug on bitmap fonts, so GDI is doing some simulation to make the function work.

Workaround:
Use GetFontUnicodeRanges and compare each character to the list of supported ranges.

Retrieve the native TrueType outlines

Everything You Always Wanted to Know About GetGlyphOutline but Were Afraid—Very Afraid—to Ask.

Read section “My Heart Is Always TrueType to You” in Ask Dr. GUI article #55 November/December 2000 http://msdn.microsoft.com/archive/en-us/dnaraskdr/html/drgui55.asp?frame=true

Q87115 HOWTO: GetGlyphOutline() Native Buffer Format
http://support.microsoft.com/support/kb/articles/q87/1/15.asp

Q241020 HOWTO: Translate Unicode Character Codes to TrueType Glyph Indices in Windows 95
http://support.microsoft.com/support/kb/articles/q241/0/20.asp

 
winspool/fonts.txt · Last modified: 2011/12/29 12:07 by christoph
 

All text is available under the terms of the GNU Free Documentation License (see Copyrights for details). Disclaimers

Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki