font

package
v0.0.0-...-de0f030 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileContentType

func GetFileContentType(file *os.File) (string, error)

func LoadOpentypeFontFromFamily

func LoadOpentypeFontFromFamily(
	family string,
	style string,
	size float64,
) (font.Face, error)

func LoadOpentypeFontFromPath

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

func LoadOpentypeFontFromPattern

func LoadOpentypeFontFromPattern(
	pattern string,
	size float64,
) (font.Face, error)

Types

type FontSet

type FontSet struct {
	Regular font.Face
	Bold    font.Face
}

func LoadOpentypeFontSetDefault

func LoadOpentypeFontSetDefault(size float64) (*FontSet, error)

func LoadOpentypeFontSetFromFamily

func LoadOpentypeFontSetFromFamily(
	family string,
	size float64,
) (*FontSet, error)

func LoadOpentypeFontSetFromPaths

func LoadOpentypeFontSetFromPaths(
	regularFontPath, boldFontPath string,
	size float64,
) (*FontSet, error)

Jump to

Keyboard shortcuts

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