Table of Contents

Class Os2Metrics

Namespace
KernSmith.Font.Tables
Assembly
KernSmith.dll

Data from the font's 'OS/2' table: weight, width, and platform-specific metrics.

public sealed record Os2Metrics : IEquatable<Os2Metrics>
Inheritance
Os2Metrics
Implements
Inherited Members

Constructors

Os2Metrics(int, int, int, int, int, int, int, int, int, byte[], int, int, short, short, short, short, short, short, short)

Data from the font's 'OS/2' table: weight, width, and platform-specific metrics.

public Os2Metrics(int WeightClass, int WidthClass, int TypoAscender, int TypoDescender, int TypoLineGap, int WinAscent, int WinDescent, int XHeight, int CapHeight, byte[] Panose, int FirstCharIndex, int LastCharIndex, short XAvgCharWidth = 0, short SubscriptXSize = 0, short SubscriptYSize = 0, short SuperscriptXSize = 0, short SuperscriptYSize = 0, short StrikeoutSize = 0, short StrikeoutPosition = 0)

Parameters

WeightClass int

Visual weight class. 400 = regular, 700 = bold.

WidthClass int

Visual width class. 5 = normal width.

TypoAscender int

Typographic ascent above the baseline, in font units.

TypoDescender int

Typographic descent below the baseline, in font units (usually negative).

TypoLineGap int

Typographic line gap, in font units.

WinAscent int

Windows clipping ascent boundary, in font units.

WinDescent int

Windows clipping descent boundary, in font units.

XHeight int

Height of lowercase 'x', in font units.

CapHeight int

Height of uppercase letters, in font units.

Panose byte[]

10-byte array classifying the font's visual style (serif, weight, etc.).

FirstCharIndex int

Lowest Unicode character in the font.

LastCharIndex int

Highest Unicode character in the font.

XAvgCharWidth short

Weighted average width of lowercase Latin letters and space, in font units.

SubscriptXSize short

Horizontal size for subscripts, in font units.

SubscriptYSize short

Vertical size for subscripts, in font units.

SuperscriptXSize short

Horizontal size for superscripts, in font units.

SuperscriptYSize short

Vertical size for superscripts, in font units.

StrikeoutSize short

Width of the strikeout stroke, in font units.

StrikeoutPosition short

Position of the strikeout stroke relative to the baseline, in font units.

Properties

CapHeight

Height of uppercase letters, in font units.

public int CapHeight { get; init; }

Property Value

int

FirstCharIndex

Lowest Unicode character in the font.

public int FirstCharIndex { get; init; }

Property Value

int

LastCharIndex

Highest Unicode character in the font.

public int LastCharIndex { get; init; }

Property Value

int

Panose

10-byte array classifying the font's visual style (serif, weight, etc.).

public byte[] Panose { get; init; }

Property Value

byte[]

StrikeoutPosition

Position of the strikeout stroke relative to the baseline, in font units.

public short StrikeoutPosition { get; init; }

Property Value

short

StrikeoutSize

Width of the strikeout stroke, in font units.

public short StrikeoutSize { get; init; }

Property Value

short

SubscriptXSize

Horizontal size for subscripts, in font units.

public short SubscriptXSize { get; init; }

Property Value

short

SubscriptYSize

Vertical size for subscripts, in font units.

public short SubscriptYSize { get; init; }

Property Value

short

SuperscriptXSize

Horizontal size for superscripts, in font units.

public short SuperscriptXSize { get; init; }

Property Value

short

SuperscriptYSize

Vertical size for superscripts, in font units.

public short SuperscriptYSize { get; init; }

Property Value

short

TypoAscender

Typographic ascent above the baseline, in font units.

public int TypoAscender { get; init; }

Property Value

int

TypoDescender

Typographic descent below the baseline, in font units (usually negative).

public int TypoDescender { get; init; }

Property Value

int

TypoLineGap

Typographic line gap, in font units.

public int TypoLineGap { get; init; }

Property Value

int

WeightClass

Visual weight class. 400 = regular, 700 = bold.

public int WeightClass { get; init; }

Property Value

int

WidthClass

Visual width class. 5 = normal width.

public int WidthClass { get; init; }

Property Value

int

WinAscent

Windows clipping ascent boundary, in font units.

public int WinAscent { get; init; }

Property Value

int

WinDescent

Windows clipping descent boundary, in font units.

public int WinDescent { get; init; }

Property Value

int

XAvgCharWidth

Weighted average width of lowercase Latin letters and space, in font units.

public short XAvgCharWidth { get; init; }

Property Value

short

XHeight

Height of lowercase 'x', in font units.

public int XHeight { get; init; }

Property Value

int