Class Font

Font class

Represents base Font class.

public abstract class Font : IFont, IFontSaver, IGlyphAccessor

Properties

NameDescription
abstract Encoding { get; }Gets Font encoding.
abstract FontDefinition { get; }Gets Font definition.
abstract FontFamily { get; set; }Gets or Sets Font family.
abstract FontName { get; set; }Gets or Sets Font face name.
abstract FontNames { get; }Gets Font names.
FontSaver { get; }Gets Font save functionality.
abstract FontStyle { get; }Gets Font style. This is a value computed and represented in generalized type.
abstract FontType { get; }Gets Font type. Type1, TrueType etc.
GlyphAccessor { get; }Font glyph accessor. Retrieves glyphs and glyph identifiers.
abstract GlyphIdType { get; }Glyph id type specification. For consumers who needs to know the ‘bytes[]’ real type.
abstract Metrics { get; }Gets Font metrics.
abstract NumGlyphs { get; }Gets number of glyphs in the Font.
abstract PostscriptNames { get; }Gets postscript Font names.
abstract Style { get; set; }Gets or Sets Font style. This is a raw string value provided by Font file.

Methods

NameDescription
static Open(FontDefinition)Opens a font, using FontDefinition object.
static Open(FontType, byte[])Opens a font, using font type and font data byte array.
static Open(FontType, StreamSource)Opens a font, using font type and stream source.
static Open(FontType, string)Opens a font, using font type and font file name.
abstract Convert(FontType)Converts the Font into another format.
abstract GetAllGlyphIds()Returns all glyph ids, available in the Font. Glyph id is a unique number for a glyph, which is font type dependent. For example: Type1’s id is a glyph name, instance of (GlyphStringId) class. TTF’s id is an int index, instance of (GlyphUInt32Id) class.
abstract GetGlyphById(GlyphId)Returns glyph by glyph id. Glyph id is a unique number for a glyph, which is font type dependent. GlyphId - derived object. For example: Type1’s id is a glyph name, instance of (GlyphStringId) class. TTF’s id is an int index, instance of (GlyphUInt32Id) class.
virtual GetGlyphsForText(string)Gets glyphs representation for text.
virtual Save(Stream)Saves the Font into original format.
virtual Save(string)Saves the Font into original format.
SaveToFormat(Stream, FontSavingFormats)Saves the Font into format specified.

See Also