fontx

package
v2.0.17 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 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

Types

type FontConfig

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

type TrueTypeFont

type TrueTypeFont struct {
	Font *truetype.Font
}

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