mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
text: make Shaper an interface
And rename out the caching implementation to FontRegistry. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ func (l *lineIterator) Next() (text.String, f32.Point, bool) {
|
||||
return text.String{}, f32.Point{}, false
|
||||
}
|
||||
|
||||
func (l Label) Layout(gtx *layout.Context, s *text.Shaper, font text.Font, txt string) {
|
||||
func (l Label) Layout(gtx *layout.Context, s text.Shaper, font text.Font, txt string) {
|
||||
cs := gtx.Constraints
|
||||
textLayout := s.Layout(gtx, font, txt, text.LayoutOptions{MaxWidth: cs.Width.Max})
|
||||
lines := textLayout.Lines
|
||||
|
||||
Reference in New Issue
Block a user