Jaa


CBLC - Color Bitmap Location Table (OpenType 1.8)

Table structure

Two new tables are used to embed color bitmaps in OFF fonts. They are the 'CBLC' table, backward compatible with the existing EBLC table for embedded bitmap locators, and the 'CBDT' table for embedded color bitmap data.

The 'CBLC' table begins with a header containing the table version and number of strikes. An OFF font may have one or more strikes embedded in the 'CBDT' table.

cblcHeader

Type Name Description
FIXED version Initially defined as 0x00030000
ULONG numsizes Number of bitmapSizeTables

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
ULONG indexSubTableArrayOffset Offset to index subtable from beginning of CBLC.
ULONG indexTablesSize number of bytes in corresponding index subtables and array
ULONG numberofIndexSubTables an index subtable for each range or format change
ULONG colorRef not used; set to 0.
sbitLineMetrics Hori line metrics for text rendered horizontally
sbitLineMetrics Vert line metrics for text rendered vertically
USHORT startGlyphIndex lowest glyph index for this size
USHORT endGlyphIndex highest glyph index for this size
BYTE ppemX horizontal pixels per Em
BYTE ppemY vertical pixels per Em
BYTE 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
CHAR 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