Skip to main content

Font Asset

In RimGui, text is rendered using SDF (Signed Distance Field).

You can generate font assets via:
Tools → Gridrand → RimGuiWindow
How to generate

caution

To avoid potential security issues from malicious font files, please use fonts from trusted sources.


AtlasFont

An asset where all characters are pre-packed into a single texture.

RawFont

At runtime, character information is read from the binary data and an SDF (Signed Distance Field) is generated.

Note that writing the SDF to the Texture every time a new character is drawn incurs a significant runtime cost.

This approach is particularly useful for dynamic fonts in languages like Chinese or Japanese, which involve a vast number of characters. Since it's impractical to pre-render all possible glyphs into an atlas at once, characters are generated and added to the atlas on demand during runtime. This allows for greater flexibility and memory efficiency, at the cost of runtime overhead.