font

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFontFace, _ = LoadFont(tffFile, 8)

Functions

func FixedInt26_6ToFloat64

func FixedInt26_6ToFloat64(i fixed.Int26_6) float64

func FixedInt26_6ToInt

func FixedInt26_6ToInt(i fixed.Int26_6) int

func LoadFont

func LoadFont(fontData []byte, size float64) (font.Face, error)

func LoadFontFromFile

func LoadFontFromFile(path string, size float64) (font.Face, error)

func MeasureString

func MeasureString(text string, fontFace font.Face) int

Types

type Metrics

type Metrics struct {
	Ascent  int
	Descent int
	Height  int
}

func NewMetrics

func NewMetrics(fontMetrics font.Metrics) Metrics

Jump to

Keyboard shortcuts

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