EBSC — Embedded Bitmap Scaling Table

The EBSC table provides a mechanism for describing embedded bitmaps which are created by scaling other embedded bitmaps. While this is the sort of thing that outline font technologies were invented to avoid, there are cases (small sizes of Kanji, for example) where scaling a bitmap produces more legible glyphs than scan-converting an outline. For this reason, the EBSC table allows a font to define a bitmap strike as a scaled version of another strike.

The EBSC table is used together with the EBDT table, which provides embedded monochrome or grayscale bitmap data, and the EBLC table, which provides embedded bitmap locators.

Formats

The EBSC table has the following format:

EBSC table

Type Name Description
uint16 majorVersion Major version of the EBSC table, = 2.
uint16 minorVersion Minor version of the EBSC table, = 0.
uint32 numSizes
BitmapScale strikes[numSizes] Array of BitmapScale records, one for each strike.

Note: The first version of the EBSC table is 2.0.

The numSizes field indicates the number of BitmapScale records in the array. Each strike is defined by one BitmapScale record.

BitmapScale record

Type Name Description
SbitLineMetrics hori line metrics
SbitLineMetrics vert line metrics
uint8 ppemX target horizontal pixels per Em
uint8 ppemY target vertical pixels per Em
uint8 substitutePpemX use bitmaps of this size
uint8 substitutePpemY use bitmaps of this size

The line metrics have the same format and meaning as those in the BitmapSize record in the EBLC table, and refer to font wide metrics after scaling. The ppemX and ppemY values describe the size of the font after scaling. The substitutePpemX and substitutePpemY values describe the size of a strike that exists as an sbit in the EBLC and EBDT, and that will be scaled up or down to generate the new strike.

Scaling in the x direction is independent of scaling in the y direction, and their scaling values may differ. A square aspect-ratio strike could be scaled to a non-square aspect ratio. Glyph metrics are scaled by the same factor as the pixels per Em (in the appropriate direction), and are rounded to the nearest integer pixel.