#include <font_scaling.h>
Provides utilities for querying and scaling font dimensions across platforms. All methods are static and operate on reference font sizes and scale factors.
Static Public Member Functions | |
| static MAXON_METHOD Float | GetReferenceFontSize () |
| static MAXON_METHOD Float | GetReferenceFontHeight () |
| static MAXON_METHOD Int32 | GetFontHeight (const OSFontDefinition &fontDef) |
| static MAXON_METHOD Float | GetFontScale (Opt< Float > fontSize={}) |
| static MAXON_METHOD Float | ScaleDimension (Float dimension, Opt< Float > fontSize={}) |
| static MAXON_METHOD Int32 | ScaleDimension (Int32 dimension, Opt< Float > fontSize={}) |
Private Member Functions | |
| MAXON_INTERFACE_NONVIRTUAL (FontScaling, MAXON_REFERENCE_STATIC, "net.maxon.interface.fontscaling") | |
|
private |
|
static |
Returns the reference font size used as the baseline for scaling calculations.
|
static |
Returns the reference font height in pixels.
|
static |
Returns the font height in pixels for the given OS font definition.
| fontDef | The OS font definition to measure. |
|
static |
Computes the font scale multiplier based on the optional font size parameter.
| fontSize | Optional font size override; if omitted, uses the font size defined in preferences. |
|
static |
Scales a floating-point dimension value by the computed font scale factor.
| dimension | The dimension value to scale. |
| fontSize | Optional font size override; if omitted, uses the font size defined in preferences. |
|
static |
Scales an integer dimension value by the computed font scale factor.
| dimension | The integer dimension value to scale. |
| fontSize | Optional font size override; if omitted, uses the font size defined in preferences. |