SpriteFontRenderer.fromFont constructor

SpriteFontRenderer.fromFont(
  1. SpriteFont font, {
  2. double scale = 1.0,
  3. double letterSpacing = 0.0,
  4. Color? color,
})

Implementation

SpriteFontRenderer.fromFont(
  this.font, {
  this.scale = 1.0,
  this.letterSpacing = 0.0,
  Color? color,
}) : paint = Paint() {
  if (color != null) {
    paint.colorFilter = ColorFilter.mode(color, BlendMode.srcIn);
  }
}