Description
The FontSmooth.Always
field is a member of the FontSmooth
enumeration within the Sandbox.UI
namespace. This field specifies that font smoothing should always be applied, ensuring that text is consistently anti-aliased regardless of the environment or platform settings.
Usage
Use FontSmooth.Always
when you want to ensure that text is rendered with anti-aliasing, providing smoother and more visually appealing text. This can be particularly useful in UI elements where text clarity is crucial.
Example
// Example of setting font smoothing to always anti-alias
var textStyle = new TextStyle();
textStyle.FontSmooth = FontSmooth.Always;
// Apply the text style to a UI element
var label = new Label();
label.Style = textStyle;