PDFsharp-net6

XFontFamily

Namespace: PdfSharp.Drawing

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

public sealed class XFontFamily

Inheritance ObjectXFontFamily

Properties

Name

Gets the name of the font family.

public string Name { get; }

Property Value

String

Families

Caution

Use platform API directly.


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

public static XFontFamily[] Families { get; }

Property Value

XFontFamily[]

Constructors

XFontFamily(String)

Initializes a new instance of the XFontFamily class.

public XFontFamily(string familyName)

Parameters

familyName String
The family name of a font.

Methods

CreateFromName_not_used(String, Boolean)

internal static XFontFamily CreateFromName_not_used(string name, bool createPlatformFamily)

Parameters

name String

createPlatformFamily Boolean

Returns

XFontFamily

GetOrCreateFontFamily(String)

An XGlyphTypeface for a font source that comes from a custom font resolver creates a solitary font family exclusively for it.

internal static XFontFamily GetOrCreateFontFamily(string name)

Parameters

name String

Returns

XFontFamily

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

Int32

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

Int32

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

Int32

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

Int32

IsStyleAvailable(XFontStyleEx)

Indicates whether the specified FontStyle enumeration is available.

public bool IsStyleAvailable(XFontStyleEx style)

Parameters

style XFontStyleEx

Returns

Boolean

GetFamilies(XGraphics)

Caution

Use platform API directly.


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

public static XFontFamily[] GetFamilies(XGraphics graphics)

Parameters

graphics XGraphics

Returns

XFontFamily[]