Font Rotation Under Microsoft WindowsLast reviewed: January 5, 1995Article ID: Q72021 |
The information in this article applies to:
SUMMARYIn versions of Microsoft Windows earlier than version 3.1, only the stroke fonts supplied with the Windows graphical device interface (GDI) are guaranteed to support rotation. Windows 3.1 introduces TrueType fonts, which also support rotation. Certain raster fonts and device fonts support rotation also; however, an application that rotates fonts on a variety of hardware should use a TrueType font or a GDI stroke font.
MORE INFORMATIONWindows supports five types of fonts: GDI raster, GDI stroke, device raster, device stroke, and TrueType. The Windows GDI provides the first two font types, the hardware device or device driver provides the second two font types, and the TrueType rasterizer in Windows 3.1 GDI provides TrueType fonts. A raster font is a set of bitmaps that represent the different glyphs (characters) of the font. A raster font is device-specific because HARDWARE devices differ in aspect ratio and resolution. Windows does not support rotating a raster font to an arbitrary angle because the fonts are specific to a device. Windows provides a number of GDI raster fonts, including MS Sans Serif and MS Serif (respectively called Helv and TmsRmn in versions of Windows earlier than 3.1). The glyphs in both stroke fonts and TrueType fonts are stored as mathematical formulas that describe the direction and length of each line and arc. Therefore, these fonts are device-independent and appropriate for any aspect ratio, resolution, or rotation. Windows can rotate GDI stroke fonts and TrueType fonts. Three stroke fonts are provided with Windows: Modern, Script, and Roman. Windows 3.1 also includes a number of TrueType fonts, including Arial and Courier New. An application can determine the attributes of a given font through three Windows functions: EnumFonts, EnumFontFamilies, and GetTextMetrics. When an application uses the EnumFont or EnumFontFamilies function, it defines a callback function that Windows calls with the attributes of each enumerated font. The FontType parameter of the callback function indicates the font's type. When an application calls the GetTextMetrics function, Windows returns a TEXTMETRIC data structure containing font attributes. The tmPitchAndFamily field provides the font type. Some hardware devices can rotate a raster font. To determine whether a device can rotate characters (above and beyond what Windows GDI does), call the GetDeviceCaps function with the TEXTCAPS parameter.
|
Additional reference words: 3.00 3.10 True Type
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |