From 3286bacc56c8a14ab31c65ce7e309284590e27a6 Mon Sep 17 00:00:00 2001 From: esimov Date: Wed, 18 Oct 2023 18:45:54 +0300 Subject: [PATCH] Fixing missing font collection --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 84084dc..396c5b3 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,7 @@ import ( "time" "gioui.org/app" + "gioui.org/font/gofont" "gioui.org/io/key" "gioui.org/io/pointer" "gioui.org/io/system" @@ -17,6 +18,7 @@ import ( "gioui.org/op" "gioui.org/op/clip" "gioui.org/op/paint" + "gioui.org/text" "gioui.org/unit" "gioui.org/widget/material" @@ -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