|
|
1.1 ! root 1: Sample: Demonstration of the Win32 Font API Functions ! 2: ! 3: Summary: ! 4: ! 5: The NTFONTS 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 ! 15: printer. ! 16: ! 17: More Information: ! 18: ! 19: The program is designed to provide the user an easy ! 20: interface to the API calls related to the font system. It ! 21: will not protect against meaningless values, nor will it ! 22: hide system oddities. Most of the buttons on the toolbar ! 23: are self explanatory and represent a single system API. ! 24: ! 25: Pressing the EnumFonts button will show all of the face ! 26: names listed horizontally, and each of the fonts within that ! 27: face name listed vertically below it. TrueType fonts will ! 28: be marked with a small colored "TT" bitmap. Fonts that have ! 29: the DEVICE_FONTTYPE bit on will be marked with a small ! 30: bitmap image of a printer. When the enumeration windows are ! 31: showing the user can click the left mouse button to copy the ! 32: information about a selected font into the LOGFONT and ! 33: TEXTMETRIC dialogs. The user can dismiss this window ! 34: without changing the dialog boxes by clicking with the right ! 35: mouse button or typing any character. ! 36: ! 37: The "Display" window is able to operate in any one of three ! 38: modes. These are listed in the "Display" menu. The first ! 39: just writes "Hello" in the middle of the screen, and it ! 40: grids the background. This is useful when utilizing the ! 41: lfEscapement and lfOrientation fields of the LOGFONT structure. ! 42: The second mode writes all of the glyphs between the tmFirstChar ! 43: and tmLastChar values stored in the TEXTMETRIC structure. The ! 44: final mode is used only for true type fonts. It calls ! 45: GetFontData, finds the 'cmap' table, and displays glyphs from ! 46: the different ranges in this table. Use the horizontal scroll ! 47: bar in the display window to step through the ranges.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.