text: update comments

This commit is contained in:
Hajime Hoshi 2022-11-24 18:22:32 +09:00
parent 2e4d4df8ec
commit b9b78b5b44

View File

@ -63,7 +63,6 @@ func drawGlyph(dst *ebiten.Image, face font.Face, r rune, img *ebiten.Image, dx,
// Adjust the position to the integers.
// The current glyph images assume that they are rendered on integer positions so far.
// The nearest filter cannot handle float positions.
op2.GeoM.Translate(math.Floor(fixed26_6ToFloat64(dx+b.Min.X)), math.Floor(fixed26_6ToFloat64(dy+b.Min.Y)))
if op != nil {
op2.GeoM.Concat(op.GeoM)
@ -132,7 +131,6 @@ func getGlyphImage(face font.Face, r rune) *ebiten.Image {
}
// Adjust the dot position so that the glyph image can be rendered on integer positions.
// The nearest filter cannot handle float positions.
x, y := -b.Min.X, -b.Min.Y
x, y = fixed.I(x.Ceil()), fixed.I(y.Ceil())
d.Dot = fixed.Point26_6{X: x, Y: y}
@ -441,7 +439,6 @@ func AppendGlyphs(glyphs []Glyph, face font.Face, text string) []Glyph {
b := getGlyphBounds(face, r)
// Adjust the position to the integers.
// The current glyph images assume that they are rendered on integer positions so far.
// The nearest filter cannot handle float positions.
glyphs = append(glyphs, Glyph{
Rune: r,
Image: img,