gofont

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

All is a slice containing all available fonts in the Go font family.

View Source
var ErrInvalidFontID = errors.New("invalid font ID")

ErrInvalidFontID indicates that a FontID is invalid.

Functions

func OpenType

func OpenType(font FontID) (*sfnt.Font, error)

OpenType returns `font` as an OpenType font.

func TrueType

func TrueType(font FontID) (*sfnt.Font, error)

TrueType returns `font` as a TrueType font.

func Type1

func Type1(font FontID) (*type1.Font, error)

Type1 returns `font` as a Type1 font.

func Type3

func Type3(font FontID) (*type3.Font, error)

Type3 returns `font` as a Type3 font.

Types

type FontID

type FontID int

FontID identifies individual fonts in the Go font family.

const (
	GoBold            FontID // gobold
	GoBoldItalic             // gobolditalic
	GoItalic                 // goitalic
	GoMedium                 // gomedium
	GoMediumItalic           // gomediumitalic
	GoRegular                // goregular
	GoSmallcaps              // gosmallcaps
	GoSmallcapsItalic        // gosmallcapsitalic
	GoMono                   // gomono
	GoMonoBold               // gomonobold
	GoMonoBoldItalic         // gomonobolditalic
	GoMonoItalic             // gomonoitalic
)

Constants for the available fonts in the Go font family.

Jump to

Keyboard shortcuts

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