fontx

package
v3.8.13 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFreeTypeContext

func NewFreeTypeContext() *freetype.Context

NewFreeTypeContext ...

Types

type FontConfig

type FontConfig struct {
	Font     *truetype.Font
	FontSize float64
	Color    color.Color
}

FontConfig ...

type TrueTypeFont

type TrueTypeFont struct {
	Font *truetype.Font
}

TrueTypeFont ...

func LoadFont

func LoadFont(fontFile string) (*TrueTypeFont, error)

LoadFont loads a font file and returns *truetype.Font.

func (*TrueTypeFont) GetMetrics

func (fo *TrueTypeFont) GetMetrics(fc *FontConfig) font.Metrics

GetMetrics gets font metrics by options.

Jump to

Keyboard shortcuts

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