mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
text/v2: add comments
This commit is contained in:
parent
2748f31fc4
commit
d8348abcc9
@ -325,7 +325,10 @@ func (g *GoTextFace) appendGlyphsForLine(glyphs []Glyph, line string, indexOffse
|
||||
X: glyph.shapingGlyph.XOffset,
|
||||
Y: -glyph.shapingGlyph.YOffset,
|
||||
})
|
||||
|
||||
// imgX and imgY are integers so that the nearest filter can be used.
|
||||
img, imgX, imgY := g.glyphImage(glyph, o)
|
||||
|
||||
// Append a glyph even if img is nil.
|
||||
// This is necessary to return index information for control characters.
|
||||
glyphs = append(glyphs, Glyph{
|
||||
|
@ -132,6 +132,8 @@ func (g *GoXFace) appendGlyphsForLine(glyphs []Glyph, line string, indexOffset i
|
||||
if prevR >= 0 {
|
||||
origin.X += g.f.Kern(prevR, r)
|
||||
}
|
||||
|
||||
// imgX and imgY are integers so that the nearest filter can be used.
|
||||
img, imgX, imgY, a := g.glyphImage(r, origin)
|
||||
|
||||
// Adjust the position to the integers.
|
||||
|
Loading…
Reference in New Issue
Block a user