FontScale

Introduction

FontScale is used to multiply the size of text. By default FontScale is set to 1. Setting FontScale to 2 doubles its size.

Setting FontScale on Skia-based platforms is similar to setting FontSize, although slight kerning differences may exist.

Setting FontScale on XNA-like platforms and FlatRedBall changes the size of the Text and can result in pixelated or blurry fonts. Unlike FontSize, changing FontScale does not require additional font assets, so it can be adjusted at runtime without generating new fonts.

Example - Setting FontScale

The following code shows how to assign FontScale.

// Initialize
MyText.FontScale = 2; // A value of 2 doubles the text's size

Last updated

Was this helpful?