mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +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,
|
X: glyph.shapingGlyph.XOffset,
|
||||||
Y: -glyph.shapingGlyph.YOffset,
|
Y: -glyph.shapingGlyph.YOffset,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// imgX and imgY are integers so that the nearest filter can be used.
|
||||||
img, imgX, imgY := g.glyphImage(glyph, o)
|
img, imgX, imgY := g.glyphImage(glyph, o)
|
||||||
|
|
||||||
// Append a glyph even if img is nil.
|
// Append a glyph even if img is nil.
|
||||||
// This is necessary to return index information for control characters.
|
// This is necessary to return index information for control characters.
|
||||||
glyphs = append(glyphs, Glyph{
|
glyphs = append(glyphs, Glyph{
|
||||||
|
@ -132,6 +132,8 @@ func (g *GoXFace) appendGlyphsForLine(glyphs []Glyph, line string, indexOffset i
|
|||||||
if prevR >= 0 {
|
if prevR >= 0 {
|
||||||
origin.X += g.f.Kern(prevR, r)
|
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)
|
img, imgX, imgY, a := g.glyphImage(r, origin)
|
||||||
|
|
||||||
// Adjust the position to the integers.
|
// Adjust the position to the integers.
|
||||||
|
Loading…
Reference in New Issue
Block a user