package font
import "gioui.org/font"
Package font provides type describing font faces attributes.
Index ¶
Types ¶
type Face ¶
Face is an opaque handle to a typeface. The concrete implementation depends upon the kind of font and shaper in use.
type Font ¶
type Font struct { Typeface Typeface Variant Variant Style Style // Weight is the text weight. If zero, Normal is used instead. Weight Weight }
Font specify a particular typeface variant, style and weight.
type FontFace ¶
A FontFace is a Font and a matching Face.
type Style ¶
type Style int
Style is the font style.
func (Style) String ¶
type Typeface ¶
type Typeface string
Typeface identifies a particular typeface design. The empty string denotes the default typeface.
type Variant ¶
type Variant string
Variant denotes a typeface variant such as "Mono" or "Smallcaps".
type Weight ¶
type Weight int
Weight is a font weight, in CSS units subtracted 400 so the zero value is normal text weight.
const ( Thin Weight = -300 ExtraLight Weight = -200 Light Weight = -100 Normal Weight = 0 Medium Weight = 100 SemiBold Weight = 200 Bold Weight = 300 ExtraBold Weight = 400 Black Weight = 500 )
func (Weight) String ¶
Source Files ¶
font.go
Directories ¶
Path | Synopsis |
---|---|
font/gofont | Package gofont exports the Go fonts as a text.Collection. |
font/opentype | Package opentype implements text layout and shaping for OpenType files. |
- Version
- v0.1.0
- Published
- Jul 1, 2023
- Platform
- windows/amd64
- Imports
- 1 packages
- Last checked
- 6 seconds ago –
Tools for package owners.