Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTextureFontSize = 64
DefaultTextureFontSize is the default size used for SDF texture generation
View Source
const MaxTextureSize = 2048
MaxTextureSize is the maximum width/height each font texture can have
View Source
const SDFRadius = 8
SDFRadius is the search radius for each pixel during the distance fields generation
Variables ¶
View Source
var ( // ErrFontDoesntFit means the font glyphs don't fit within the maximum texture limit ErrFontDoesntFit = errors.New("font texture doesn't fit within texture size limits") )
View Source
var ErrFontNotFound = errors.New("could not find font files")
ErrFontNotFound means any valid font formats (ttf, sdf+atlas) could not be found
Functions ¶
Types ¶
type Font ¶
Font holds the necessary data for using a font in youi
func DefaultFont ¶
func DefaultFont() *Font
DefaultFont loads (and generate, if necessary) the default font for youi (goregular)
Click to show internal directories.
Click to hide internal directories.