libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Attributes | List of all members
donut::graphics::FontOptions Struct Reference

Configuration options for a Font. More...

#include <donut/graphics/Font.hpp>

Public Attributes

bool useLinearFiltering = false
 Use bilinear filtering rather than nearest-neighbor interpolation when rendering text at a non-1:1 scale using this font. More...
 

Detailed Description

Configuration options for a Font.

Member Data Documentation

◆ useLinearFiltering

bool donut::graphics::FontOptions::useLinearFiltering = false

Use bilinear filtering rather than nearest-neighbor interpolation when rendering text at a non-1:1 scale using this font.

When set to true, this will cause scaled text to appear smoother compared to regular blocky nearest-neighbor scaling. Using linear filtering can help reduce aliasing artifacts on the glyph edges, but also makes the text more blurry.

Note
Regardless of this option, The best results are usually achieved when text is rendered at an appropriate character size to begin with, rather than relying on scaling.

The documentation for this struct was generated from the following file: