CBLC — Color Bitmap Location Table
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 downward compatible extensions of 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. An OpenType font may have one or more strikes embedded in the 'CBDT' table.
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 records. |
BitmapSize | bitmapSizes[numSizes] | BitmapSize records array. |
Note that the first version of the CBLC table is 3.0.
Each strike is defined by a BitmapSize record.
BitmapSize record
Type | Name | Description |
---|---|---|
Offset32 | indexSubtableListOffset | Offset to index subtable from beginning of CBLC. |
uint32 | indexSubtableListSize | 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 addition to already defined bitDepth values 1, 2, 4, and 8 used for monochrome and grayscale bitmaps, the value of 32 is used to identify color bitmaps with 8 bit per channel BGRA pixel data. |
int8 | flags | Vertical or horizontal (see the Bitmap flags section of the EBLC table chapter). |
The indexSubtableListOffset is the offset from the beginning of the CBLC table to an IndexSubtableList. The indexSubtableListSize is the total size in bytes of the IndexSubtableList data, including the array of IndexSubtables. Each strike has an IndexSubtableList to support various formats and discontiguous ranges of bitmaps. Each IndexSubtable provides the locations of the bitmap data for one or more glyphs within the CBDT table, and may optionally provide glyph metrics to use for that set of glyphs.
Remaining details regarding the structure of the CBDT table are identical to those defined for the EBLC table.