Class FontFactory
Entry point for loading fonts. Dispatches to the appropriate reader based on FontType and the stream magic bytes.
Inherited Members
Namespace: DRIT.Drawing.Font
Assembly: DRIT.Drawing.dll
Syntax
public static class FontFactory
Methods
Open(FontDefinition)
Opens a single font face from the supplied definition.
Declaration
public static IFont Open(FontDefinition definition)
Parameters
| Type | Name | Description |
|---|---|---|
| FontDefinition | definition |
Returns
| Type | Description |
|---|---|
| IFont | An IFont implementation appropriate for the font type
(e.g. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| NotSupportedException | The font format is not yet supported. |
| InvalidOperationException | The font data is corrupt or cannot be parsed. |
OpenCollection(IStreamSource)
Opens all font faces from a font collection file (TTC).
Declaration
public static FontFaceCollection OpenCollection(IStreamSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| IStreamSource | source |
Returns
| Type | Description |
|---|---|
| FontFaceCollection | A FontFaceCollection containing one IFont per face. |