• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class FontFactory

Entry point for loading fonts. Dispatches to the appropriate reader based on FontType and the stream magic bytes.

Inheritance
object
FontFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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. TtfFont, CffFont, Type1Font).

Exceptions
Type Condition
ArgumentNullException

definition is null.

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.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX