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

Class TtfCbdtTable

Parsed OpenType "CBDT" (Color Bitmap Data) table. Exposes colour bitmap images (typically PNG) for individual glyphs. Requires the companion "CBLC" table to be parsed first; pass a DRIT.Drawing.Font.Ttf.Tables.TtfCblcTable to Parse(byte[], byte[], TtfCblcTable). Ref: OpenType spec §table-CBDT.

Inheritance
object
TtfTableBase
TtfCbdtTable
Inherited Members
TtfTableBase.Tag
TtfTableBase.RawBytes
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DRIT.Drawing.Font.Ttf.Tables
Assembly: DRIT.Drawing.dll
Syntax
public sealed class TtfCbdtTable : TtfTableBase

Fields

TableTag

The table tag for the CBDT table.

Declaration
public const string TableTag = "CBDT"
Field Value
Type Description
string

Properties

StrikeCount

Number of bitmap strikes exposed by the CBLC companion table.

Declaration
public int StrikeCount { get; }
Property Value
Type Description
int

Methods

GetGlyphBitmap(int, int)

Returns the raw image bytes (PNG) for glyphIndex in strikeIndex, or null when the glyph is absent from that strike.

Declaration
public byte[]? GetGlyphBitmap(int glyphIndex, int strikeIndex = 0)
Parameters
Type Name Description
int glyphIndex
int strikeIndex
Returns
Type Description
byte[]
Remarks

The metrics header prepended by CBDT image formats 17/18/19 is stripped; the returned bytes always begin with the raw PNG signature when the underlying image is encoded as PNG.

GetStrikePpemX(int)

Pixels-per-em (X axis) for the given strike, or 0 when out of range.

Declaration
public int GetStrikePpemX(int strikeIndex)
Parameters
Type Name Description
int strikeIndex
Returns
Type Description
int

GetStrikePpemY(int)

Pixels-per-em (Y axis) for the given strike, or 0 when out of range.

Declaration
public int GetStrikePpemY(int strikeIndex)
Parameters
Type Name Description
int strikeIndex
Returns
Type Description
int
Back to top

DR-IT Software documentation

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

Generated by DocFX