Page 122 - DCAP408_WEB_PROGRAMMING
P. 122
Windows Programming
Notes
Example: GDI makes a string bold by expanding the spacing of each character and
overstriking by an offset value; it italicizes a font by shearing the string. In either case, there is
an overhang past the basic string. For bold strings, the overhang is the distance by which the
overstrike is offset. For italic strings, the overhang is the amount the top of the font is sheared
past the bottom of the font.
The tmOverhang member enables the application to determine how much of the character
width returned by a GetTextExtentPoint32 function call on a single character is the actual character
width and how much is the per-string extra width. The actual width is the extent minus the
overhang.
tmDigitizedAspectX
Specifies the horizontal aspect of the device for which the font was designed.
tmDigitizedAspectY
Specifies the vertical aspect of the device for which the font was designed. The ratio of the
tmDigitizedAspectX and tmDigitizedAspectY members is the aspect ratio of the device for
which the font was designed.
tmFirstChar
Specifies the value of the first character defined in the font.
tmLastChar
Specifies the value of the last character defined in the font.
tmDefaultChar
Specifies the value of the character to be substituted for characters not in the font.
tmBreakChar
Specifies the value of the character that will be used to define word breaks for text justification.
tmItalic
Specifies an italic font if it is nonzero.
tmUnderlined
Specifies an underlined font if it is nonzero.
tmStruckOut
Specifies a strikeout font if it is nonzero.
tmPitchAndFamily
Specifies information about the pitch, the technology, and the family of a physical font.
Value Description
TMPF_FIXED_PITCH If this bit is set the font is a variable pitch font. If this bit is clear the
font is a fixed pitch font. Observe that those meanings are the
opposite of what the constant name implies.
TMPF_VECTOR If this bit is set, the font is a vector font.
TMPF_TRUETYPE If this bit is set, the font is a TrueType font.
TMPF_DEVICE If this bit is set, the font is a device font.
116 LOVELY PROFESSIONAL UNIVERSITY