Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TextMetrics Structure

Provides basic information about the font specified by a visual style for a particular element.

Namespace:  System.Windows.Forms.VisualStyles
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public struct TextMetrics

The TextMetrics type exposes the following members.

  NameDescription
Public propertyAscentGets or sets the ascent of characters in the font.
Public propertyAverageCharWidthGets or sets the average width of characters in the font.
Public propertyBreakCharGets or sets the character used to define word breaks for text justification.
Public propertyCharSetGets or sets the character set of the font.
Public propertyDefaultCharGets or sets the character to be substituted for characters not in the font.
Public propertyDescentGets or sets the descent of characters in the font.
Public propertyDigitizedAspectXGets or sets the horizontal aspect of the device for which the font was designed.
Public propertyDigitizedAspectYGets or sets the vertical aspect of the device for which the font was designed.
Public propertyExternalLeadingGets or sets the amount of extra leading that the application adds between rows.
Public propertyFirstCharGets or sets the first character defined in the font.
Public propertyHeightGets or sets the height of characters in the font.
Public propertyInternalLeadingGets or sets the amount of leading inside the bounds set by the Height property.
Public propertyItalicGets or sets a value indicating whether the font is italic.
Public propertyLastCharGets or sets the last character defined in the font.
Public propertyMaxCharWidthGets or sets the width of the widest character in the font.
Public propertyOverhangGets or sets the extra width per string that may be added to some synthesized fonts.
Public propertyPitchAndFamilyGets or sets information about the pitch, technology, and family of a physical font.
Public propertyStruckOutGets or sets a value indicating whether the font specifies a horizontal line through the characters.
Public propertyUnderlinedGets or sets a value indicating whether the font is underlined.
Public propertyWeightGets or sets the weight of the font.
Top

  NameDescription
Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from ValueType.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

The TextMetrics structure specifies the return values of the VisualStyleRenderer.GetTextMetrics method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft