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

Interface IFont

Represents a loaded font face and provides access to its metadata, metrics, encoding map, and glyph data.

Namespace: DRIT.Drawing.Font.Core
Assembly: DRIT.Drawing.dll
Syntax
public interface IFont

Properties

Encoding

Encoding map that translates Unicode code points to glyph identifiers.

Declaration
IFontEncoding Encoding { get; }
Property Value
Type Description
IFontEncoding

FontFamily

Family name of the font, e.g. "Montserrat".

Declaration
string FontFamily { get; }
Property Value
Type Description
string

FontName

Full name of the font, e.g. "Montserrat Regular".

Declaration
string FontName { get; }
Property Value
Type Description
string

GlyphAccessor

Provides access to individual glyphs by identifier or index.

Declaration
IGlyphAccessor GlyphAccessor { get; }
Property Value
Type Description
IGlyphAccessor

Metrics

Font-level metrics (ascender, descender, units per em, etc.).

Declaration
IFontMetrics Metrics { get; }
Property Value
Type Description
IFontMetrics

NumGlyphs

Total number of glyphs in the font.

Declaration
int NumGlyphs { get; }
Property Value
Type Description
int

Style

Typographic style of this font face.

Declaration
FontFaceStyle Style { get; }
Property Value
Type Description
FontFaceStyle

Methods

Save(Stream)

Serialises the (possibly modified) font to stream.

Declaration
void Save(Stream stream)
Parameters
Type Name Description
Stream stream

Save(string)

Serialises the (possibly modified) font to the file at filePath.

Declaration
void Save(string filePath)
Parameters
Type Name Description
string filePath
Back to top

DR-IT Software documentation

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

Generated by DocFX