Skip to main content

one_bit

Function one_bit 

Source
pub fn one_bit(def: &FontAtlasDef, image: &Image) -> Result<Vec<u8>, String>
Expand description

The one-bit atlas (ONE_BIT_FILE) of the atlas picture image laid out as def: each glyph in cell index order, one byte per pixel row, the highest bit the left pixel, set where the picture isn’t see-through; a wide glyph’s two halves are two cells like any other. Fails for cells wider than 8 pixels.