PDFsharp-net6

XTypeface

Namespace: PdfSharp.Drawing

Represents a combination of XFontFamily, XFontWeight, XFontStyleEx, and XFontStretch.

public class XTypeface

Inheritance ObjectXTypeface

Properties

Family

Gets the font family from which the typeface was constructed.

public XFontFamily Family { get; }

Property Value

XFontFamily

Style

Gets the style of the Typeface.

public XFontStyle Style { get; }

Property Value

XFontStyle

Weight

Gets the relative weight of the typeface.

public XFontWeight Weight { get; }

Property Value

XFontWeight

Stretch

Gets the stretch value for the Typeface. The stretch value determines whether a typeface is expanded or condensed when it is displayed.

public XFontStretch Stretch { get; }

Property Value

XFontStretch

Constructors

XTypeface(String)

Initializes a new instance of the XTypeface class.

public XTypeface(string typefaceName)

Parameters

typefaceName String
Name of the typeface.

XTypeface(XFontFamily, XFontStyle, XFontWeight, XFontStretch)

Initializes a new instance of the XTypeface class.

public XTypeface(XFontFamily family, XFontStyle style, XFontWeight weight, XFontStretch stretch)

Parameters

family XFontFamily
The font family of the typeface.

style XFontStyle
The style of the typeface.

weight XFontWeight
The relative weight of the typeface.

stretch XFontStretch
The degree to which the typeface is stretched.

Methods

TryGetGlyphTypeface(XGlyphTypeface&)

Tries the get GlyphTypeface that corresponds to the Typeface.

public bool TryGetGlyphTypeface(XGlyphTypeface& glyphTypeface)

Parameters

glyphTypeface XGlyphTypeface&
The glyph typeface that corresponds to this typeface, or null if the typeface was constructed from a composite font.

Returns

Boolean