getTextWidthHalo static method

int getTextWidthHalo(
  1. String text, {
  2. int fontSize = 8,
})

Text width on Halo's monospace Dogica font. fontSize is the frame.display.set_font size (a multiple of 8; default 8).

Implementation

static int getTextWidthHalo(String text, {int fontSize = 8}) {
  return text.length * (fontSize ~/ 8) * haloCharWidth;
}