Skip to content

Data Types

The-Nice-One edited this page Aug 5, 2026 · 2 revisions

Data Types

Reference for the data types used throughout this specification and its reference parser (spf.rs). Type names below match the Rust identifiers exactly.

Primitives

Type Description
u8 A single byte representing a number from 0 to 255 unless otherwise specified.
String A null-terminated (0x00), UTF-8 encoded byte string of any length. Unless otherwise specified.

| | Vec | u8 length byte followed by that many entries of type T. Unless otherwise specified. |

Version

Identifies which version of the SimplePixelFont binary layout a file was parsed from or should be serialized as.

Variant Description
FV0 The latest SimplePixelFont format version.

|

ColorType

Distinguishes whether a color should be treated as fixed or can be themed and recolored by the renderer.

Variant Description
Dynamic The renderer may substitute this color to support features such as text color or palette theming.

| | Absolute | The renderer should render this color exactly as specified, without substitution. |

FontType

Bit flags describing the typographic style a font represents. No flags set means Regular.

Bit Name Description
0 Bold The bold-weight variant of a font family.

| | 1 | Italic | The italic or oblique variant of a font family. | | 2-7 | — | Reserved for future use. |

No bits set represents Regular: The default variant of a font family.

Clone this wiki locally