Class TtfOs2Table
Parsed OpenType "OS/2" table (OS/2 and Windows metrics). Contains typographic metrics and embedding license flags used by both DRIT.Document (text layout) and DRIT.Pdf (font embedding). Ref: OpenType spec §5.7.
Inherited Members
Namespace: DRIT.Drawing.Font.Ttf.Tables
Assembly: DRIT.Drawing.dll
Syntax
public sealed class TtfOs2Table : TtfTableBase
Fields
TableTag
The table tag for the OS/2 table.
Declaration
public const string TableTag = "OS/2"
Field Value
| Type | Description |
|---|---|
| string |
Properties
CodePageRange1
Code-page coverage bitmask 1 (version ≥ 1 only; null for v0).
Declaration
public int? CodePageRange1 { get; }
Property Value
| Type | Description |
|---|---|
| int? |
CodePageRange2
Code-page coverage bitmask 2 (version ≥ 1 only; null for v0).
Declaration
public int? CodePageRange2 { get; }
Property Value
| Type | Description |
|---|---|
| int? |
FsType
Embedding licensing flags (raw fsType value from the table).
Use GetLicenseFlags() for interpreted per-bit access.
Declaration
public ushort FsType { get; }
Property Value
| Type | Description |
|---|---|
| ushort |
StrikeoutPosition
Distance from baseline to top of strikeout stroke, in design units (from OS/2 yStrikeoutPosition). Positive values are above the baseline.
Declaration
public short StrikeoutPosition { get; }
Property Value
| Type | Description |
|---|---|
| short |
StrikeoutSize
Strikeout stroke thickness, in design units (from OS/2 yStrikeoutSize).
Declaration
public short StrikeoutSize { get; }
Property Value
| Type | Description |
|---|---|
| short |
TypoAscender
Typographic ascender above baseline, in design units.
Declaration
public short TypoAscender { get; }
Property Value
| Type | Description |
|---|---|
| short |
TypoDescender
Typographic descender below baseline (negative), in design units.
Declaration
public short TypoDescender { get; }
Property Value
| Type | Description |
|---|---|
| short |
TypoLineGap
Typographic line gap, in design units.
Declaration
public short TypoLineGap { get; }
Property Value
| Type | Description |
|---|---|
| short |
WinAscent
Windows-compatible ascender, in design units.
Declaration
public ushort WinAscent { get; }
Property Value
| Type | Description |
|---|---|
| ushort |
WinDescent
Windows-compatible descender (positive), in design units.
Declaration
public ushort WinDescent { get; }
Property Value
| Type | Description |
|---|---|
| ushort |
Methods
GetLicenseFlags()
Returns a LicenseFlags instance that exposes per-bit embedding restriction properties derived from FsType.
Declaration
public LicenseFlags GetLicenseFlags()
Returns
| Type | Description |
|---|---|
| LicenseFlags |
Parse(byte[])
Parses the "OS/2" table from its raw bytes.
Declaration
public static TtfOs2Table Parse(byte[] rawBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | rawBytes |
Returns
| Type | Description |
|---|---|
| TtfOs2Table |