builtin

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0, BSD-3-Clause Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package builtin provides engine-shipped assets, currently the Go Regular font. Games use Font to identify it; [castrum.New] makes the built-in path available alongside game assets.

Index

Constants

View Source
const Font = "builtin/fonts/GoRegular.ttf"

Font is the asset path for the built-in Go Regular font.

Variables

This section is empty.

Functions

func Register

func Register(loader *asset.Loader) error

Register loads and caches the built-in font. Loaders created by [castrum.New] can resolve it automatically; standalone loaders must use WithFilesystem.

func WithFilesystem

func WithFilesystem(filesystem fs.FS) fs.FS

WithFilesystem returns a filesystem that serves built-in assets and resolves all other paths from filesystem. Use it with asset.NewLoader when not using [castrum.New]. If filesystem is nil, other paths resolve from the current working directory. Paths under "builtin/" are reserved for engine-shipped assets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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