Documentation ¶
Index ¶
- Variables
- type Alignment
- type FontFamilySetter
- type FontSizeSetter
- type FontStyleSetter
- type FontWeightSetter
- type LineHeightSetter
- type Style
- func (s *Style) Eq(style *Style) cmp.Result
- func (s Style) Merge(style Style) Style
- func (s *Style) SetFontFamily(fontFamily string)
- func (s *Style) SetFontSize(fontSize unit.Sp)
- func (s *Style) SetFontStyle(style font.Style)
- func (s *Style) SetFontWeight(w weight.Weight)
- func (s *Style) SetLineHeight(lineHeight unit.Sp)
- func (s *Style) SetStyle(style Style)
- func (s *Style) SetTextAlign(textAlign Alignment)
- func (s *Style) SetTextColor(c color.Color)
- func (s Style) ToFont() font.Font
- type StyleSetter
- type TextAlignSetter
- type TextColorSetter
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultShaper = text.NewShaper(text.WithCollection(gofont.Collection()))
View Source
var ShaperContext = contextutil.New[*text.Shaper](contextutil.Defaulter(func() *text.Shaper { return DefaultShaper }))
Functions ¶
This section is empty.
Types ¶
type FontFamilySetter ¶
type FontFamilySetter interface {
SetFontFamily(fontFamily string)
}
type FontSizeSetter ¶
type FontStyleSetter ¶
type FontWeightSetter ¶
type LineHeightSetter ¶
type Style ¶
type Style struct { FontFamily string FontWeight weight.Weight FontStyle *font.Style FontSize unit.Sp LineHeight unit.Sp // Not Implemented LetterSpacing unit.Sp Color color.NRGBA TextAlign *Alignment }
func (*Style) SetFontFamily ¶
func (*Style) SetFontSize ¶
func (*Style) SetFontStyle ¶
func (*Style) SetFontWeight ¶
func (*Style) SetLineHeight ¶
func (*Style) SetTextAlign ¶
func (*Style) SetTextColor ¶
type StyleSetter ¶
type StyleSetter interface {
SetStyle(s Style)
}
type TextAlignSetter ¶
type TextAlignSetter interface {
SetTextAlign(a Alignment)
}
type TextColorSetter ¶
Click to show internal directories.
Click to hide internal directories.