Skip to main content

Module bitmap

Module bitmap 

Source
Expand description

Embedded bitmap glyphs.

A font stores its bitmaps in strikes, one per size. BitmapStrikes reads them from the first of sbix, CBDT and EBDT that a GlyphSourceOrder prefers. It selects a Strike for a size, and a strike returns a BitmapGlyph. The pixels of a BitmapGlyph can be read without knowing how the table stores them.

Structsยง

Bgra
Uncompressed 32-bit color pixels.
BitmapGlyph
An embedded bitmap glyph.
BitmapStrikes
The bitmap strikes of a font, read from a single table.
Mask
A single channel coverage mask of 1, 2, 4 or 8 bits per pixel.
MaskRow
One row of a Mask.
Strike
A set of bitmaps at one size.

Enumsยง

BitmapSource
A table that provides bitmaps.
Kind ๐Ÿ”’
Origin
The corner of a bitmap that the inner bearings position.
Pixels
Pixel data for a bitmap glyph.
StrikeKind ๐Ÿ”’

Constantsยง

MAX_SBIX_DUPES ๐Ÿ”’
The maximum number of dupe entries to follow.
PNG_SIGNATURE ๐Ÿ”’
The eight-byte signature at the start of every PNG file.

Functionsยง

closer_to ๐Ÿ”’
Returns true if a strike of candidate pixels per em is a better match for ppem than a strike of best.
sbix_bearings ๐Ÿ”’
Returns the bearings used to position an sbix bitmap, in font units.
sbix_glyph ๐Ÿ”’
Reads a PNG glyph from an sbix strike.