benilla-re systems structs docs

s_viewportWidth

global · font

Address
0xc2b9a4 · 4 bytes, up to 0xc2b9a7
Type
uint32_t
Meaning
Holds the viewport width in pixels
Confidence
verified, proof one
Finding
font/metrics#screen-and-pixel-units

Finding: Screen and pixel units in font: scaling, advances and metrics

The layout measures in fractions of the screen height. 0xc2b9a0 holds the viewport height in pixels and 0xc2b9a4 its width. 0x5c6fa0(raw, v) converts a height fraction to pixels (rounded half away from zero), 0x5c7010 does the same against the width, 0x5c7080(pixels) converts back and 0x5c2540(font) returns a font's natural height pixelSize / screenHeight.

The derivation is in the doc.