mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
examples/font: Add an English sentence
This commit is contained in:
parent
deabfa5e15
commit
1b86bb9889
@ -38,6 +38,8 @@ var (
|
|||||||
// text is a head part of a Japanese novel 山月記 (Sangetsuki)
|
// text is a head part of a Japanese novel 山月記 (Sangetsuki)
|
||||||
// See http://www.aozora.gr.jp/cards/000119/files/624_14544.html.
|
// See http://www.aozora.gr.jp/cards/000119/files/624_14544.html.
|
||||||
var text = []string{
|
var text = []string{
|
||||||
|
"The quick brown fox jumps over the lazy dog.",
|
||||||
|
"",
|
||||||
"隴西の李徴は博学才穎、天宝の末年、",
|
"隴西の李徴は博学才穎、天宝の末年、",
|
||||||
"若くして名を虎榜に連ね、",
|
"若くして名を虎榜に連ね、",
|
||||||
"ついで江南尉に補せられたが、",
|
"ついで江南尉に補せられたが、",
|
||||||
@ -79,8 +81,7 @@ func parseFont() error {
|
|||||||
d.DrawString(s)
|
d.DrawString(s)
|
||||||
y += dy
|
y += dy
|
||||||
}
|
}
|
||||||
textImage.ReplacePixels(dst.Pix)
|
return textImage.ReplacePixels(dst.Pix)
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func update(screen *ebiten.Image) error {
|
func update(screen *ebiten.Image) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user