Click or drag to resize

Font Class

Defines a format for text
Inheritance Hierarchy

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public class Font : Widget

The Font type exposes the following members.

Constructors
  NameDescription
Public methodFont(FontIHandler)
Initializes a new instance of the Font class with the specified font handler
Public methodFont(FontTypeface, Single, FontDecoration)
Initializes a new instance of the Font class with the specified typeface and size
Public methodFont(SystemFont, NullableSingle, FontDecoration)
Creates a new instance of the Font class with a specified systemFont and optional custom size
Public methodFont(String, Single, FontStyle, FontDecoration)
Creates a new instance of the Font class with a specified family, size, and style
Public methodFont(FontFamily, Single, FontStyle, FontDecoration)
Creates a new instance of the Font class with a specified family, size, and style
Top
Properties
  NameDescription
Public propertyAscent
Gets the top y co-ordinate from the baseline to the tallest character ascent
Public propertyBaseline
Gets the offset of the baseline from the drawing point
Public propertyBold
Gets a value indicating that this font has a bold style
Public propertyDescent
Gets the bottom y co-ordinate from the baseline to the longest character descent
Public propertyFamily
Gets the family information for this font
Public propertyFamilyName
Gets the name of the family of this font
Public propertyFontDecoration
Gets the decorations applied to the font
Public propertyFontStyle
Gets the style flags for this font
Public propertyItalic
Gets a value indicating that this font has an italic style
Public propertyLeading
Gets the leading space between each line
Public propertyLineHeight
Gets the height of a single line of the font
Public propertySize
Gets the size, in points, of this font
Public propertyStrikethrough
Gets a value indicating that this font has a strikethrough decoration
Public propertyTypeface
Gets the typeface information for this font
Public propertyUnderline
Gets a value indicating that this font has an underline decoration
Public propertyXHeight
Gets the height of the lower case 'x' character
Top
Methods
Remarks
A font is typically defined with a specified font family, with a given typeface. Each typeface has certain characteristics that define the variation of the font family, for example Bold, or Italic. You can get a list of FontFamily objects available in the current system using AvailableFontFamilies, which can then be used to create an instance of a font.
See Also