font

package
v0.0.0-...-124f97e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoGlyph = errors.New("no glyph for rune")

Functions

func FixToFloat

func FixToFloat(v fixed.Int26_6) float32

Types

type Args

type Args struct {
	Color      color.T
	LineHeight float32
}

type Glyph

type Glyph struct {
	Size    vec2.T
	Bearing vec2.T
	Advance float32
	Mask    *image.Data
	// contains filtered or unexported fields
}

func (*Glyph) ImageData

func (r *Glyph) ImageData() *image.Data

func (*Glyph) Key

func (r *Glyph) Key() string

func (*Glyph) TextureArgs

func (r *Glyph) TextureArgs() texture.Args

func (*Glyph) Version

func (r *Glyph) Version() int

type T

type T interface {
	Name() string
	Glyph(rune) (*Glyph, error)
	Kern(rune, rune) float32
	Measure(string, Args) vec2.T
	Size() float32
}

func Load

func Load(filename string, size int, scale float32) T

Jump to

Keyboard shortcuts

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