Partilhar via


CBLC — Color Bitmap Location Table (OpenType 1.8.1)

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 bitmapSizeTables

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

The cblcHeader is followed immediately by the bitmapSizeTable array(s). The numSizes in the cblcHeader indicates the number of bitmapSizeTables in the array. Each strike is defined by one bitmapSizeTable.

bitmapSizeTable

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 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 bitmapFlags)

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'.