Skip to content

Commit

Permalink
Fixing missing font collection
Browse files Browse the repository at this point in the history
  • Loading branch information
esimov committed Oct 18, 2023
1 parent e2137b5 commit 3286bac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import (
"time"

"gioui.org/app"
"gioui.org/font/gofont"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/system"
"gioui.org/layout"
"gioui.org/op"
"gioui.org/op/clip"
"gioui.org/op/paint"
"gioui.org/text"
"gioui.org/unit"
"gioui.org/widget/material"

Expand Down Expand Up @@ -77,6 +79,7 @@ func loop(w *app.Window) error {
defaultColor := color.NRGBA{R: 0x9a, G: 0x9a, B: 0x9a, A: 0xff}

th := material.NewTheme()
th.Shaper = text.NewShaper(text.WithCollection(gofont.Collection()))
th.TextSize = unit.Sp(12)
th.Palette.ContrastBg = defaultColor
th.FingerSize = 15
Expand Down

0 comments on commit 3286bac

Please sign in to comment.