Class FontFileDefinition
Pairs a file-extension hint (e.g. "ttf", "otf", "cff", "pfb") with the IStreamSource that provides the raw font bytes.
Inherited Members
Namespace: DRIT.Drawing.Font.Sources
Assembly: DRIT.Drawing.dll
Syntax
public sealed class FontFileDefinition
Constructors
FontFileDefinition(string, IStreamSource)
Initializes a new FontFileDefinition with the specified file extension and source.
Declaration
public FontFileDefinition(string fileExtension, IStreamSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileExtension | The file extension without the leading dot (e.g. "ttf", "otf"). |
| IStreamSource | source | The source from which the font bytes are obtained. |
Properties
FileExtension
File extension without the leading dot, lower-case (e.g. "ttf", "woff2"). Used as a hint when the font format cannot be inferred from the stream magic bytes.
Declaration
public string FileExtension { get; }
Property Value
| Type | Description |
|---|---|
| string |
Source
Gets the source from which the font bytes are obtained.
Declaration
public IStreamSource Source { get; }
Property Value
| Type | Description |
|---|---|
| IStreamSource |