LabelRasterizer

class LabelRasterizer(textMeasurer: TextMeasurer, emojiFont: FontFamily, textFont: FontFamily = FontFamily.Default, bandFont: FontFamily = textFont) : LabelTextMeasurer(source)

Draws a LabelLayout at one pixel per printer dot and thresholds it to one bit. Text is bold in textFont; emoji come from emojiFont, a one-color face, because color emoji threshold to blobs. Band words are bold in bandFont.

Constructors

Link copied to clipboard
constructor(textMeasurer: TextMeasurer, emojiFont: FontFamily, textFont: FontFamily = FontFamily.Default, bandFont: FontFamily = textFont)

Functions

Link copied to clipboard

Null when the layout is taller than the head.

Link copied to clipboard
open override fun width(text: String, size: Int, emoji: Boolean): Float