diff --git a/example/go.mod b/example/go.mod index 0870a3f4..e555cccd 100644 --- a/example/go.mod +++ b/example/go.mod @@ -3,7 +3,7 @@ module gioui.org/example go 1.13 require ( - gioui.org v0.0.0-20191021105805-3a60a384e65c + gioui.org v0.0.0-20191023081811-143d2aae95dd github.com/google/go-github/v24 v24.0.1 golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3 golang.org/x/image v0.0.0-20190802002840-cff245a6509b diff --git a/example/go.sum b/example/go.sum index 41f70132..73b914bc 100644 --- a/example/go.sum +++ b/example/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20191021105805-3a60a384e65c h1:42IbhLn4RDzLNrWB4ZUviW3osMRPqTbOSEyDAg8b6F0= -gioui.org v0.0.0-20191021105805-3a60a384e65c/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY= +gioui.org v0.0.0-20191023081811-143d2aae95dd h1:+k1caVAXQjs7GNZUia8dx15V0xCEFW/SixnHmpvP+PU= +gioui.org v0.0.0-20191023081811-143d2aae95dd/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= diff --git a/example/gophers/main.go b/example/gophers/main.go index dbcb6d34..4fa99534 100644 --- a/example/gophers/main.go +++ b/example/gophers/main.go @@ -28,8 +28,6 @@ import ( _ "image/png" _ "net/http/pprof" - - _ "gioui.org/font/gofont" ) type App struct { diff --git a/example/gophers/ui.go b/example/gophers/ui.go index 668d09c6..b02bc9da 100644 --- a/example/gophers/ui.go +++ b/example/gophers/ui.go @@ -12,6 +12,7 @@ import ( "runtime" "gioui.org/f32" + "gioui.org/font/gofont" "gioui.org/gesture" "gioui.org/io/key" "gioui.org/io/pointer" @@ -64,6 +65,7 @@ type user struct { var theme *material.Theme func init() { + gofont.Register() theme = material.NewTheme() theme.Color.Text = rgb(0x333333) theme.Color.Hint = rgb(0xbbbbbb) diff --git a/example/hello/hello.go b/example/hello/hello.go index 2f85cb18..0bc18463 100644 --- a/example/hello/hello.go +++ b/example/hello/hello.go @@ -14,7 +14,7 @@ import ( "gioui.org/text" "gioui.org/widget/material" - _ "gioui.org/font/gofont" + "gioui.org/font/gofont" ) func main() { @@ -28,6 +28,7 @@ func main() { } func loop(w *app.Window) error { + gofont.Register() th := material.NewTheme() gtx := &layout.Context{ Queue: w.Queue(), diff --git a/example/kitchen/kitchen.go b/example/kitchen/kitchen.go index df500bad..4143b482 100644 --- a/example/kitchen/kitchen.go +++ b/example/kitchen/kitchen.go @@ -18,7 +18,7 @@ import ( "golang.org/x/exp/shiny/materialdesign/icons" - _ "gioui.org/font/gofont" + "gioui.org/font/gofont" ) func main() { @@ -28,6 +28,7 @@ func main() { log.Fatal(err) } icon = ic + gofont.Register() go func() { w := app.NewWindow() if err := loop(w); err != nil {