examples/fontvector: add alphabets

This commit is contained in:
Hajime Hoshi 2023-11-20 03:50:41 +09:00
parent c0e41de921
commit 1be6aa5e98

View File

@ -59,10 +59,10 @@ func (g *Game) Update() error {
return err return err
} }
op := &text.LayoutOptions{} op := &text.LayoutOptions{}
op.LineSpacingInPixels = 100 op.LineSpacingInPixels = 110
text.AppendVectorPath(&g.path, "あいうえお\nかきくけこ", &text.GoTextFace{ text.AppendVectorPath(&g.path, "ABCEDFG\nabcdefg\nあいうえお\nかきくけこ", &text.GoTextFace{
Source: s, Source: s,
Size: 100, Size: 90,
}, op) }, op)
} }
@ -83,7 +83,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
for i := range g.vertices { for i := range g.vertices {
g.vertices[i].DstX += 50 g.vertices[i].DstX += 50
g.vertices[i].DstY += 50 g.vertices[i].DstY += 0
g.vertices[i].SrcX = 1 g.vertices[i].SrcX = 1
g.vertices[i].SrcY = 1 g.vertices[i].SrcY = 1
} }