|
|
1.1 root 1: Sample: Demonstration of the Win32 Font API Functions
2:
3: Summary:
4:
5: The TTFONTS sample is an easy to use, powerful utility which
6: allows the user to explore the font system. There is a
7: toolbar on top of the main frame window with buttons that
8: allow the following actions:
9:
10: 1.Enumerate all of the fonts installed for the display.
11: 2.Get TEXTMETRIC & OUTLINETEXTMETRIC information.
12: 3.Create a font based on an arbitrary LOGFONT structure.
13: 4.Get "font data" by using the GetFontData() API.
14: 5.Enumerate all of the fonts available to the default printer.
15:
16: More Information:
17:
18: The program is designed to provide the user an easy
19: interface to the API calls related to the font system. It
20: will not protect against meaningless values, nor will it
21: hide system oddities. Most of the buttons on the toolbar
22: are self explanatory and represent a single system API.
23:
24: Pressing the EnumFonts button will show all of the face
25: names listed horizontally, and each of the fonts within that
26: face name listed vertically below it. TrueType fonts will
27: be marked with a small colored "TT" bitmap. Fonts that have
28: the DEVICE_FONTTYPE bit on will be marked with a small
29: bitmap image of a printer. When the enumeration windows are
30: showing the user can click the left mouse button to copy the
31: information about a selected font into the LOGFONT and
32: TEXTMETRIC dialogs. The user can dismiss this window
33: without changing the dialog boxes by clicking with the right
34: mouse button or typing any character.
35:
36: The "Display" window is able to operate in any one of three
37: modes. These are listed in the "Display" menu. The first
38: just writes "Hello" in the middle of the screen, and it
39: grids the background. This is useful when utilizing the
40: lfEscapement and lfOrientation fields of the LOGFONT structure.
41: The second mode writes all of the glyphs between the tmFirstChar
42: and tmLastChar values stored in the TEXTMETRIC structure. The
43: final mode is used only for true type fonts. It calls
44: GetFontData, finds the 'cmap' table, and displays glyphs from
45: the different ranges in this table. Use the horizontal scroll
46: bar in the display window to step through the ranges.
47:
48: Notice:
49:
50: There is a font distributed on the Win32 SDK disk which covers
51: more than one thousand unicode characters. In order to use this
52: application to its full potential, you will want to install that
53: font using the Control Panel, Fonts item. The font is named
54: l_10646.TTF.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.