Class XFont
Defines an object used to draw text.
public sealed class XFont
- Inheritance
-
XFont
- Inherited Members
Constructors
XFont(XGlyphTypeface, double, XPdfFontOptions?, XStyleSimulations?)
Initializes a new instance of the XFont class. Not yet implemented.
public XFont(XGlyphTypeface glyphTypeface, double emSize, XPdfFontOptions? pdfOptions = null, XStyleSimulations? styleSimulations = null)
Parameters
glyphTypeface
XGlyphTypefaceThe typeface.
emSize
doubleThe em size.
pdfOptions
XPdfFontOptionsThe PDF options.
styleSimulations
XStyleSimulations?The style simulations.
XFont(XTypeface, double, XPdfFontOptions?, XStyleSimulations?)
Initializes a new instance of the XFont class. Not yet implemented.
[Obsolete("Not yet implemented.")]
public XFont(XTypeface typeface, double emSize, XPdfFontOptions? pdfOptions = null, XStyleSimulations? styleSimulations = null)
Parameters
typeface
XTypefaceThe typeface.
emSize
doubleThe em size.
pdfOptions
XPdfFontOptionsThe PDF options.
styleSimulations
XStyleSimulations?The style simulations.
Exceptions
- NotImplementedException
XFont
XFont(string, double)
Initializes a new instance of the XFont class.
public XFont(string familyName, double emSize)
Parameters
XFont(string, double, XFontStyle, XFontWeight, XFontStretch, XPdfFontOptions?, XStyleSimulations?)
Initializes a new instance of the XFont class. Not yet implemented.
[Obsolete("Not yet implemented.")]
public XFont(string familyName, double emSize, XFontStyle style, XFontWeight weight, XFontStretch fontStretch, XPdfFontOptions? pdfOptions = null, XStyleSimulations? styleSimulations = null)
Parameters
familyName
stringName of the family.
emSize
doubleThe em size.
style
XFontStyleThe style.
weight
XFontWeightThe weight.
fontStretch
XFontStretchThe font stretch.
pdfOptions
XPdfFontOptionsThe PDF options.
styleSimulations
XStyleSimulations?The style simulations.
Exceptions
- NotImplementedException
XFont
XFont(string, double, XFontStyleEx)
Initializes a new instance of the XFont class.
public XFont(string familyName, double emSize, XFontStyleEx style)
Parameters
familyName
stringName of the font family.
emSize
doubleThe em size.
style
XFontStyleExThe font style.
XFont(string, double, XFontStyleEx, XPdfFontOptions)
Initializes a new instance of the XFont class.
public XFont(string familyName, double emSize, XFontStyleEx style, XPdfFontOptions pdfOptions)
Parameters
familyName
stringName of the font family.
emSize
doubleThe em size.
style
XFontStyleExThe font style.
pdfOptions
XPdfFontOptionsAdditional PDF options.
Properties
Bold
Indicates whether this XFont object is bold.
public bool Bold { get; }
Property Value
CellAscent
Gets the cell ascent, the area above the base line that is used by the font.
public int CellAscent { get; }
Property Value
CellDescent
Gets the cell descent, the area below the base line that is used by the font.
public int CellDescent { get; }
Property Value
CellSpace
Gets the cell space for the font. The CellSpace is the line spacing, the sum of CellAscent and CellDescent and optionally some extra space.
public int CellSpace { get; }
Property Value
FontFamily
Gets the XFontFamily object associated with this XFont object.
[Browsable(false)]
public XFontFamily FontFamily { get; }
Property Value
Height
Gets the line spacing of this font.
[Browsable(false)]
public int Height { get; }
Property Value
IsSymbolFont
Indicates whether this XFont object is a symbol font.
public bool IsSymbolFont { get; }
Property Value
Italic
Indicates whether this XFont object is italic.
public bool Italic { get; }
Property Value
Metrics
Gets the font metrics.
public XFontMetrics Metrics { get; }
Property Value
- XFontMetrics
The metrics.
Name
WRONG: Gets the face name of this Font object. Indeed, it returns the font family name.
public string Name { get; }
Property Value
PdfOptions
Gets the PDF options of the font.
public XPdfFontOptions PdfOptions { get; }
Property Value
Size
Gets the em-size of this font measured in the unit of this font object.
public double Size { get; }
Property Value
Strikeout
Indicates whether this XFont object is stroke out.
public bool Strikeout { get; }
Property Value
Style
Gets style information for this Font object.
[Browsable(false)]
public XFontStyleEx Style { get; }
Property Value
Underline
Indicates whether this XFont object is underlined.
public bool Underline { get; }
Property Value
Methods
GetHeight()
Returns the line spacing, in pixels, of this font. The line spacing is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself.
public double GetHeight()
Returns
GetHeight(XGraphics)
Returns the line spacing, in the current unit of a specified Graphics object, of this font. The line spacing is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of
[Obsolete("Use GetHeight() without parameter.")]
public double GetHeight(XGraphics graphics)
Parameters
graphics
XGraphics