Add Text.FontSize

This commit is contained in:
Trevor Slocum 2024-10-15 12:40:20 -07:00
parent 8aa49057b7
commit a4a591ea39

View file

@ -234,6 +234,14 @@ func (t *Text) SetAutoHideScrollBar(autoHide bool) {
t.field.SetAutoHideScrollBar(autoHide)
}
// FontSize returns the font size of the field.
func (t *Text) FontSize() int {
t.Lock()
defer t.Unlock()
return t.textAutoSize
}
// SetFont sets the font and text size of the field. Scaling is not applied.
func (t *Text) SetFont(fnt *sfnt.Font, size int) {
t.Lock()