Embed the bundled monospace font in the client binary
The font atlas loader read the bundled Noto Sans Mono from a cwd-relative path with system-font fallbacks, so launching the editor from outside the repo root could pick a different font or fail. The bundled font is now embedded with #load; EditorMono.ttf remains an optional on-disk override, and the system fallback paths are gone. Together with the embedded shaders this makes the binary fully self-contained. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
8d85568713
commit
41adeeb47f
2 changed files with 15 additions and 19 deletions
|
|
@ -60,7 +60,7 @@ Use `Ctrl+W` to close the active buffer, or click a tab's `x`. Dirty buffers are
|
|||
|
||||
SDL mode creates an SDL3 `GPUDevice` and uses a direct SDL3 GPU command-buffer renderer when a GPU backend is available. It batches editor rectangles, selections, cursor lines, panels, and `stb_truetype` font-atlas text into GPU vertices. It falls back to the regular SDL renderer in unsupported environments such as `SDL_VIDEODRIVER=dummy` smoke tests.
|
||||
|
||||
The GPU font loader checks `client/odin/assets/fonts/EditorMono.ttf`, `client/odin/assets/fonts/NotoSansMono-Regular.ttf`, then common system monospace font locations. The repo includes a bundled Noto Sans Mono font for the default path.
|
||||
The bundled Noto Sans Mono font is embedded into the client binary at build time, so the editor always has a working monospace font. Place a `client/odin/assets/fonts/EditorMono.ttf` file to override it.
|
||||
|
||||
The GPU editor path includes lightweight Kotlin/Java syntax highlighting for comments, block comments, strings, character literals, triple-quoted Kotlin strings, keywords, numbers, and type-like identifiers.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue