diff --git a/text/text.go b/text/text.go index 2af4e3891..ea3633fac 100644 --- a/text/text.go +++ b/text/text.go @@ -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,