Skip to Content
defold-typescript libraries
myopic-design

myopic-design/defold-fontscale/fontscale

Reads the operating system's font-scale (text size) setting.

  • GitHub: myopic-design/defold-fontscale — pinned to v0.1.0
    1. Pick a release from myopic-design/defold-fontscale releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as fontscale from "fontscale"

Functions

get(): number

Returns the OS font-scale factor, where 1 is the default text size.

Returns

  • number — The current font-scale factor.

On this page