Documentation
¶
Overview ¶
Package font provides an interface for dealing with fonts. This allows other parts of the engine to stay platform independent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Load func(Query) Font
Load is a function that loads a font from a query. An implementation must set this variable to an appropriate function.
Functions ¶
This section is empty.
Types ¶
type Font ¶
A Font is used in layout to calculate text metrics. It is also passed to the paint.List, to select the correct font for rendering.
type Query ¶
type Query struct { // Names is a string of NUL-separated fields. // Each field is one font name that should be tried. Names string // Size is the requested font size (ascender + descender), in pixels. Size int // Weight is the requested weight. It will usually be a number between 100 and 900. Weight int // Italic is true when an oblique or italic font is requested. // We don't differenciate between the two. Italic bool }
A Query contains information about a requested font.
Click to show internal directories.
Click to hide internal directories.