export class MonoDisplayFont {
  public FONT_DATA: Uint8Array;
  constructor(font_data: Uint8Array | number[]) {
    this.FONT_DATA = new Uint8Array(font_data.length);
    for (let i = 0; i < font_data.length; i++) {
      this.FONT_DATA[i] = font_data[i] || 0;
    }
  }
}

export type RasterizedText = { pixels: Uint8Array; width: number; height: number };

export type RasterizeTextFunction = (
  text: string,
  cellHeight: number,
  font: MonoDisplayFont,
) => RasterizedText;
