Table of Contents

Class XFont

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

Defines an object used to draw text.

public sealed class XFont
Inheritance
object
XFont

Constructors

XFont(XGlyphTypeface, double, XPdfFontOptions?, XStyleSimulations?)

Initializes a new instance of the XFont class. Not yet implemented.

XFont(XTypeface, double, XPdfFontOptions?, XStyleSimulations?)

Initializes a new instance of the XFont class. Not yet implemented.

XFont(string, double)

Initializes a new instance of the XFont class.

XFont(string, double, XFontStyle, XFontWeight, XFontStretch, XPdfFontOptions?, XStyleSimulations?)

Initializes a new instance of the XFont class. Not yet implemented.

XFont(string, double, XFontStyleEx)

Initializes a new instance of the XFont class.

XFont(string, double, XFontStyleEx, XPdfFontOptions)

Initializes a new instance of the XFont class.

Properties

Bold

Indicates whether this XFont object is bold.

CellAscent

Gets the cell ascent, the area above the baseline that is used by the font.

CellDescent

Gets the cell descent, the area below the baseline that is used by the font.

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.

FontFamily

Gets the XFontFamily object associated with this XFont object.

Height

Gets the line spacing of this font.

IsSymbolFont

Indicates whether this XFont object is a symbol font.

Italic

Indicates whether this XFont object is italic.

Metrics

Gets the font metrics.

Name

Gets the font family name.

Name2
PdfOptions

Gets the PDF options of the font.

Size

Gets the em-size of this font measured in the unit of this font object.

Strikeout

Indicates whether this XFont object is stroke out.

Style

Gets style information for this Font object.

Underline

Indicates whether this XFont object is underlined.

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.

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