asset

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package asset provides engine-bundled assets. It embeds the engine's two default fonts — Google Sans Flex (proportional) and Google Sans Code (monospace), both under the SIL Open Font License — and exposes helpers to load additional fonts supplied by a game.

Index

Constants

This section is empty.

Variables

View Source
var DefaultMonospaceFont = MustLoadFont(googleSansCodeTTF)

DefaultMonospaceFont is the engine's default monospace font (Google Sans Code, OFL), for debug overlays and aligned columnar text.

View Source
var DefaultProportionalFont = MustLoadFont(googleSansFlexTTF)

DefaultProportionalFont is the engine's default proportional font (Google Sans Flex, OFL), for general UI and world-space text.

Functions

func LoadFont

func LoadFont(b []byte) (*text.GoTextFaceSource, error)

LoadFont parses TrueType/OpenType font bytes into a GoTextFaceSource.

func MustLoadFont

func MustLoadFont(b []byte) *text.GoTextFaceSource

MustLoadFont parses font bytes and panics on failure, for package initialization of embedded fonts.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL