text: Update bitmapfont to v2

This commit is contained in:
Hajime Hoshi 2020-09-23 22:59:42 +09:00
parent 88c340f32d
commit f189404370
3 changed files with 5 additions and 5 deletions

2
go.mod
View File

@ -6,7 +6,7 @@ require (
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200707082815-5321531c36a2
github.com/gofrs/flock v0.8.0
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/hajimehoshi/bitmapfont v1.3.0
github.com/hajimehoshi/bitmapfont/v2 v2.0.0
github.com/hajimehoshi/file2byteslice v0.0.0-20200812174855-0e5e8a80490e
github.com/hajimehoshi/go-mp3 v0.3.1
github.com/hajimehoshi/oto v0.6.5-0.20200917193348-57f376f2c835

4
go.sum
View File

@ -5,8 +5,8 @@ github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/hajimehoshi/bitmapfont v1.3.0 h1:h6+HJQ+2MKT3lEVEArjVC4/h0qcFXlVsMTGuRijEnVA=
github.com/hajimehoshi/bitmapfont v1.3.0/go.mod h1:/Qb7yVjHYNUV4JdqNkPs6BSZwLjKqkZOMIp6jZD0KgE=
github.com/hajimehoshi/bitmapfont/v2 v2.0.0 h1:8l4JqHSygivwD1YwqSJVXFhkQySe4wBroXmTJmmMZ2k=
github.com/hajimehoshi/bitmapfont/v2 v2.0.0/go.mod h1:2BnYrkTQGThpr/CY6LorYtt/zEPNzvE/ND69CRTaHMs=
github.com/hajimehoshi/file2byteslice v0.0.0-20200812174855-0e5e8a80490e h1:4IP7CPObI35+mQShFOYg2JMHDJKciLTW5599inhFfkA=
github.com/hajimehoshi/file2byteslice v0.0.0-20200812174855-0e5e8a80490e/go.mod h1:CqqAHp7Dk/AqQiwuhV1yT2334qbA/tFWQW0MD2dGqUE=
github.com/hajimehoshi/go-mp3 v0.3.1 h1:pn/SKU1+/rfK8KaZXdGEC2G/KCB2aLRjbTCrwKcokao=

View File

@ -18,7 +18,7 @@ import (
"image/color"
"testing"
"github.com/hajimehoshi/bitmapfont"
"github.com/hajimehoshi/bitmapfont/v2"
"github.com/hajimehoshi/ebiten"
t "github.com/hajimehoshi/ebiten/internal/testing"
@ -32,7 +32,7 @@ func TestMain(m *testing.M) {
func TestTextColor(t *testing.T) {
clr := color.RGBA{0x80, 0x80, 0x80, 0x80}
img, _ := ebiten.NewImage(30, 30, ebiten.FilterNearest)
Draw(img, "Hello", bitmapfont.Gothic12r, 12, 12, clr)
Draw(img, "Hello", bitmapfont.Face, 12, 12, clr)
w, h := img.Size()
allTransparent := true