Table of Contents

Class XFontFamily

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

Defines a group of typefaces having a similar basic design and certain variations in styles.

public sealed class XFontFamily
Inheritance
XFontFamily
Inherited Members

Constructors

XFontFamily(string)

Initializes a new instance of the XFontFamily class.

public XFontFamily(string familyName)

Parameters

familyName string

The family name of a font.

Properties

Families

Returns an array that contains all the FontFamily objects associated with the current graphics context.

[Obsolete("Use platform API directly.")]
public static XFontFamily[] Families { get; }

Property Value

XFontFamily[]

Name

Gets the name of the font family.

public string Name { get; }

Property Value

string

Methods

GetCellAscent(XFontStyleEx)

Returns the cell ascent, in design units, of the XFontFamily object of the specified style.

public int GetCellAscent(XFontStyleEx style)

Parameters

style XFontStyleEx

Returns

int

GetCellDescent(XFontStyleEx)

Returns the cell descent, in design units, of the XFontFamily object of the specified style.

public int GetCellDescent(XFontStyleEx style)

Parameters

style XFontStyleEx

Returns

int

GetEmHeight(XFontStyleEx)

Gets the height, in font design units, of the em square for the specified style.

public int GetEmHeight(XFontStyleEx style)

Parameters

style XFontStyleEx

Returns

int

GetFamilies(XGraphics)

Returns an array that contains all the FontFamily objects available for the specified graphics context.

[Obsolete("Use platform API directly.")]
public static XFontFamily[] GetFamilies(XGraphics graphics)

Parameters

graphics XGraphics

Returns

XFontFamily[]

GetLineSpacing(XFontStyleEx)

Returns the line spacing, in design units, of the FontFamily object of the specified style. The line spacing is the vertical distance between the base lines of two consecutive lines of text.

public int GetLineSpacing(XFontStyleEx style)

Parameters

style XFontStyleEx

Returns

int

IsStyleAvailable(XFontStyleEx)

Indicates whether the specified FontStyle enumeration is available.

public bool IsStyleAvailable(XFontStyleEx style)

Parameters

style XFontStyleEx

Returns

bool