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

Interface IFontMetrics

Provides access to horizontal and typographic font metrics in design units.

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

Properties

Ascender

Maximum ascender value above the baseline, in design units (from hhea.Ascender).

Declaration
double Ascender { get; }
Property Value
Type Description
double

Descender

Maximum descender value below the baseline, in design units (from hhea.Descender, typically negative).

Declaration
double Descender { get; }
Property Value
Type Description
double

LineGap

Line gap (leading) recommended by the font, in design units (from hhea.LineGap).

Declaration
double LineGap { get; }
Property Value
Type Description
double

StrikeoutPosition

Distance from the baseline to the top of the strikeout stroke, in design units (from OS/2 yStrikeoutPosition). Positive values are above the baseline.

Declaration
double StrikeoutPosition { get; }
Property Value
Type Description
double

StrikeoutSize

Thickness of the strikeout stroke, in design units (from OS/2 yStrikeoutSize).

Declaration
double StrikeoutSize { get; }
Property Value
Type Description
double

TypoAscender

Typographic ascender from the OS/2 sTypoAscender field, in design units.

Declaration
double TypoAscender { get; }
Property Value
Type Description
double

TypoDescender

Typographic descender from the OS/2 sTypoDescender field, in design units (typically negative).

Declaration
double TypoDescender { get; }
Property Value
Type Description
double

UnderlinePosition

Offset of the top of the underline stroke from the baseline, in design units (from the 'post' table). Negative values place the underline below the baseline.

Declaration
double UnderlinePosition { get; }
Property Value
Type Description
double

UnderlineThickness

Thickness of the underline stroke, in design units (from the 'post' table).

Declaration
double UnderlineThickness { get; }
Property Value
Type Description
double

UnitsPerEM

Number of design units that make up one em square.

Declaration
double UnitsPerEM { get; }
Property Value
Type Description
double

Methods

GetGlyphWidth(GlyphId)

Returns the horizontal advance width of the glyph identified by glyphId, in design units.

Declaration
double GetGlyphWidth(GlyphId glyphId)
Parameters
Type Name Description
GlyphId glyphId
Returns
Type Description
double
Back to top

DR-IT Software documentation

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

Generated by DocFX