CBLC — Color Bitmap Location Table (OpenType 1.8.3)

Table structure

The CBLC table provides embedded bitmap locators. It is used together with the CBDT table, which provides embedded, color bitmap glyph data. The formats of these two tables are backward compatible with the EBDT and EBLC tables used for embedded monochrome and grayscale bitmaps.

The CBLC table begins with a header containing the table version and number of strikes.

CblcHeader

Type Name Description
uint16 majorVersion Major version of the CBLC table, = 3.
uint16 minorVersion Minor version of the CBLC table, = 0.
uint32 numSizes Number of BitmapSize tables

Note that the first version of the CBLC table is 3.0.

The CblcHeader is followed immediately by the BitmapSize table array(s). The numSizes in the CblcHeader indicates the number of BitmapSize tables in the array. Each strike is defined by one BitmapSize table.

BitmapSize Table

Type Name Description
Offset32 indexSubTableArrayOffset Offset to index subtable from beginning of CBLC.
uint32 indexTablesSize Number of bytes in corresponding index subtables and array.
uint32 numberofIndexSubTables There is an index subtable for each range or format change.
uint32 colorRef Not used; set to 0.
SbitLineMetrics hori Line metrics for text rendered horizontally.
SbitLineMetrics vert Line metrics for text rendered vertically.
uint16 startGlyphIndex Lowest glyph index for this size.
uint16 endGlyphIndex Highest glyph index for this size.
uint8 ppemX Horizontal pixels per em.
uint8 ppemY Vertical pixels per em.
uint8 bitDepth In addtition to already defined bitDepth values 1, 2, 4, and 8 supported by existing implementations, the value of 32 is used to identify color bitmaps with 8 bit per pixel RGBA channels.
int8 flags Vertical or horizontal (see the Bitmap Flags section of the EBLC table chapter).

The indexSubTableArrayOffset is the offset from the beginning of the CBLC table to the indexSubTableArray. Each strike has one of these arrays to support various formats and discontiguous ranges of bitmaps. The indexTablesSize is the total number of bytes in the indexSubTableArray and the associated indexSubTables. The numberOfIndexSubTables is a count of the indexSubTables for this strike.

The rest of the CBLC table structure is identical to one already defined for EBLC.