examples/font: Simplify

This commit is contained in:
Hajime Hoshi 2016-08-16 02:42:06 +09:00
parent aa811b5ce5
commit 348e11ac1b

View File

@ -76,12 +76,11 @@ func parseFont() error {
Hinting: font.HintingFull, Hinting: font.HintingFull,
}), }),
} }
dy := size * dpi / 72 y := size
y := dy
for _, s := range text { for _, s := range text {
d.Dot = fixed.P(0, y) d.Dot = fixed.P(0, y)
d.DrawString(s) d.DrawString(s)
y += dy y += size
} }
return textImage.ReplacePixels(dst.Pix) return textImage.ReplacePixels(dst.Pix)
} }