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 a more legible font 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.

EBSC Header

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

Type Name Description
uint16 majorVersion Major version of the EBSC table, = 2.
uint16 minorVersion Minor version of the EBSC table, = 0.
uint32 numSizes

Note that the first version of the EBSC table is 2.0.

The header is followed immediately by the BitmapScale table array. The numSizes field indicates the number of BitmapScale tables in the array. Each strike is defined by one BitmapScale table.

BitmapScale Table

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 meaning as those in the BitmapSize record, 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.

Notice that 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.