Table of Contents

Class XFontSource

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

The bytes of a font file.

public class XFontSource
Inheritance
XFontSource
Inherited Members

Properties

Bytes

Gets the bytes of the font.

public byte[] Bytes { get; }

Property Value

byte[]

FontName

Gets the name of the font’s name table.

public string FontName { get; }

Property Value

string

Methods

CreateCompiledFont(byte[])

Creates a font source from a byte array.

public static XFontSource CreateCompiledFont(byte[] bytes)

Parameters

bytes byte[]

Returns

XFontSource

CreateFromFile(string)

Creates an XFontSource from a font file.

public static XFontSource CreateFromFile(string path)

Parameters

path string

The path of the font file.

Returns

XFontSource

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

GetOrCreateFrom(byte[])

Gets an existing font source or creates a new one. A new font source is cached in font factory.

public static XFontSource GetOrCreateFrom(byte[] bytes)

Parameters

bytes byte[]

Returns

XFontSource