Help us shape the future of Go! Take the 2026 Go Developer Survey

fontfile

package
v1.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Artistic-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package fontfile finds additional TrueType/OpenType fonts by PostScript name. Files are read from the machine running plot-go, never bundled with it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names

func Names() []string

Names returns sorted resolvable names (PostScript names and full-name aliases).

func Rune

func Rune(c byte) rune

Rune applies Grace's Latin text encoding, including the curly apostrophe.

Types

type Face

type Face struct {
	Font                                  *sfnt.Font
	Path                                  string
	UnderlinePosition, UnderlineThickness float64
}

Face is an immutable parsed font. Callers use their own sfnt.Buffer.

func Get

func Get(name string) (*Face, error)

Get resolves a PostScript or full font name. OFE_FONT_PATH is a path-list of files or directories searched before the standard system/user font folders. The first matching file wins. Unreadable or malformed font files are skipped; unresolved names return an error so the renderer can report its fallback.

Jump to

Keyboard shortcuts

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