Documentation ¶
Overview ¶
Package font handles graphical text entries with customizable font size, style and color. It uses a small subset of the features provided by the SFML library version 2.5 1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
A Font provides glyphs (visual characters) and metrics used for text rendering.
type Style ¶
type Style uint32
Style is a bitfield which represents the style of a text.
const ( // Regular characters (no style). Regular Style = C.sfTextRegular // Bold characters. Bold Style = C.sfTextBold // Italic characters. Italic Style = C.sfTextItalic // Underlined characters. Underlined Style = C.sfTextUnderlined )
Text styles.
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
Text represent a graphical text entry with a specific font size, style and color. It implements the wandi.Image interface.
func NewText ¶
NewText returns a new graphical text entry based on the provided font and any optional customization arguments. The initial text, size, style and color of the graphical text entry can be customized through string, int, Style and color.Color arguments respectively, depending on the type of the argument.
The default font size, style and color of the text is 12, regular (no style) and black respectively.
Note: The Free method of the text entry must be called when finished using it.