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 ¶
var DefaultMonospaceFont = MustLoadFont(googleSansCodeTTF)
DefaultMonospaceFont is the engine's default monospace font (Google Sans Code, OFL), for debug overlays and aligned columnar text.
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.