util

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FontByName

func FontByName(name string) ([]byte, error)

func GetFace added in v0.0.4

func GetFace(name string, fontsize float64, dpi float64) (font.Face, error)

GetFace returns a font.Face for the given font name. This supports both TrueType fonts (scaled to the given size and DPI) and bitmap fonts (which ignore size and DPI).

func GetFontFace

func GetFontFace(fontsize float64, dpi float64, gr *truetype.Font) font.Face

func OpenFont

func OpenFont(name string) (*truetype.Font, error)

OpenFont loads a TrueType font by name. Note: This currently only supports TrueType fonts provided by the gofont packages. Bitmap fonts like basicfont or inconsolata cannot be returned as *truetype.Font.

Types

This section is empty.

Jump to

Keyboard shortcuts

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