mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
text: Use bitmapfont package for testing
This commit is contained in:
parent
e54da620dd
commit
1c088dc8b6
2
go.mod
2
go.mod
@ -5,8 +5,8 @@ require (
|
||||
github.com/go-gl/glfw v0.0.0-20180813204114-2484f3e51bc4
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
|
||||
github.com/gopherjs/gopherwasm v0.1.1
|
||||
github.com/hajimehoshi/bitmapfont v1.0.2
|
||||
github.com/hajimehoshi/go-mp3 v0.1.1
|
||||
github.com/hajimehoshi/go-mplusbitmap v1.0.1
|
||||
github.com/hajimehoshi/oto v0.1.2
|
||||
github.com/jakecoffman/cp v0.1.0
|
||||
github.com/jfreymuth/oggvorbis v1.0.0
|
||||
|
5
go.sum
5
go.sum
@ -8,10 +8,10 @@ github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f h1:FDM3EtwZLyhW4
|
||||
github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gopherjs/gopherwasm v0.1.1 h1:R/3+SfgCFStiql6ICfyfke1WtpglfjIvTEBux8R1euc=
|
||||
github.com/gopherjs/gopherwasm v0.1.1/go.mod h1:kx4n9a+MzHH0BJJhvlsQ65hqLFXDO/m256AsaDPQ+/4=
|
||||
github.com/hajimehoshi/bitmapfont v1.0.2 h1:30AXHzHv9J3r7Q6FawvLCeGkRZlF/7lq6yC5ifN0nDY=
|
||||
github.com/hajimehoshi/bitmapfont v1.0.2/go.mod h1:KQGAlhASw21tAOCcESd/CXl1XnPU7EN97NSnRO75n5g=
|
||||
github.com/hajimehoshi/go-mp3 v0.1.1 h1:Y33fAdTma70fkrxnc9u50Uq0lV6eZ+bkAlssdMmCwUc=
|
||||
github.com/hajimehoshi/go-mp3 v0.1.1/go.mod h1:4i+c5pDNKDrxl1iu9iG90/+fhP37lio6gNhjCx9WBJw=
|
||||
github.com/hajimehoshi/go-mplusbitmap v1.0.1 h1:Q7vA2o/9uIXS0isGPeXc4ahLMFBfZl592OZgb/MH90w=
|
||||
github.com/hajimehoshi/go-mplusbitmap v1.0.1/go.mod h1:zW+y7DzqcVGNiGVPga2gau26lxIzv7zvtOEjgMiz6pU=
|
||||
github.com/hajimehoshi/oto v0.1.1/go.mod h1:hUiLWeBQnbDu4pZsAhOnGqMI1ZGibS6e2qhQdfpwz04=
|
||||
github.com/hajimehoshi/oto v0.1.2 h1:qYOk4cOkcFLWov5OtekLWvgP8PCLb5iDrHWnuvMg7LM=
|
||||
github.com/hajimehoshi/oto v0.1.2/go.mod h1:1iS1lbBMU/SpoU8yZkduCxbqV/hVdGRiNwgbvYO3sG4=
|
||||
@ -26,7 +26,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/pkg/browser v0.0.0-20170505125900-c90ca0c84f15/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
|
||||
github.com/theckman/go-flock v0.4.0 h1:bcqNkS4RTQBGWybG7IBimUMxnLz53Qes1+D4QaOhzJc=
|
||||
github.com/theckman/go-flock v0.4.0/go.mod h1:kjuth3y9VJ2aNlkNEO99G/8lp9fMIKaGyBmh84IBheM=
|
||||
golang.org/x/exp v0.0.0-20180710024300-14dda7b62fcd h1:nLIcFw7GiqKXUS7HiChg6OAYWgASB2H97dZKd1GhDSs=
|
||||
|
@ -20,10 +20,10 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hajimehoshi/bitmapfont"
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
"github.com/hajimehoshi/ebiten/internal/testflock"
|
||||
. "github.com/hajimehoshi/ebiten/text"
|
||||
"github.com/hajimehoshi/go-mplusbitmap"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
@ -46,7 +46,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", mplusbitmap.Gothic12r, 12, 12, clr)
|
||||
Draw(img, "Hello", bitmapfont.Gothic12r, 12, 12, clr)
|
||||
|
||||
w, h := img.Size()
|
||||
allTransparent := true
|
||||
|
Loading…
Reference in New Issue
Block a user