Class Font
Font class
Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
public sealed class Font : ICloneable, IDisposable
Constructors
Name | Description |
---|
Font(Font, FontStyle) | Initializes a new Font that uses the specified existing Font and FontStyle enumeration. |
Font(string, float) | Initializes a new Font using a specified size. |
Font(string, float, FontStyle) | Initializes a new Font using a specified size and style. |
Properties
Name | Description |
---|
Bold { get; } | Gets a value that indicates whether this Font is bold. |
Height { get; } | Gets the line spacing of this font. |
IsSystemFont { get; } | Gets a value indicating whether the font is a member of SystemFonts. |
Italic { get; } | Gets a value that indicates whether this Font is italic. |
Name { get; } | Gets the face name of this Font . |
OriginalFontName { get; } | Gets the name of the font originally specified. |
Size { get; } | Gets the em-size of this Font measured in the units specified by the Unit property. |
SizeInPoints { get; } | Gets the em-size, in points, of this Font . |
Strikeout { get; } | Gets a value that indicates whether this Font specifies a horizontal line through the font. |
Style { get; } | Gets style information for this Font . |
SystemFontName { get; } | Gets the name of the system font if the IsSystemFont property returns true. |
Underline { get; } | Gets a value that indicates whether this Font is underlined. |
Methods
Name | Description |
---|
Clone() | Creates an exact copy of this Font . |
Dispose() | Releases all resources used by this Font . |
override Equals(object) | Indicates whether the specified object is a Font and has the same FontFamily, GdiVerticalFont, GdiCharSet, Style , Size , and Unit property values as this Font . |
override GetHashCode() | Gets the hash code for this Font . |
GetHeight() | Returns the line spacing, in pixels, of this font. |
GetHeight(float) | Returns the height, in pixels, of this Font when drawn to a device with the specified vertical resolution. |
override ToString() | Returns a string representation of this Font . |
See Also