Documentation ¶
Overview ¶
Package d2font contains logic for loading and processing d2 fonts
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Font ¶
type Font struct { Glyphs map[rune]*d2fontglyph.FontGlyph // contains filtered or unexported fields }
Font represents a displayable font
func (*Font) GetTextMetrics ¶
GetTextMetrics returns the dimensions of the Font element in pixels
func (*Font) RenderText ¶
func (f *Font) RenderText(text string, target d2interface.Surface) error
RenderText prints a text using its configured style on a Surface (multi-lines are left-aligned, use label otherwise)
func (*Font) SetBackground ¶
func (f *Font) SetBackground(sheet d2interface.Animation)
SetBackground sets font's background
Directories ¶
Path | Synopsis |
---|---|
Package d2fontglyph represents a single font glyph
|
Package d2fontglyph represents a single font glyph |
Click to show internal directories.
Click to hide internal directories.