Table of Contents

Class XTypeface

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

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

public class XTypeface
Inheritance
XTypeface
Inherited Members

Constructors

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.

XTypeface(string)

Initializes a new instance of the XTypeface class.

public XTypeface(string typefaceName)

Parameters

typefaceName string

Name of the typeface.

Properties

Family

Gets the font family from which the typeface was constructed.

public XFontFamily Family { get; }

Property Value

XFontFamily

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

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

Methods

TryGetGlyphTypeface(out XGlyphTypeface?)

Tries the get GlyphTypeface that corresponds to the Typeface.

public bool TryGetGlyphTypeface(out 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

bool