text: Bug fix: space was not used correctly

This commit is contained in:
Hajime Hoshi 2017-07-21 00:44:37 +09:00
parent 47734f28e3
commit 064b359c78

View File

@ -219,7 +219,12 @@ func getGlyphFromCache(face font.Face, r rune, now int64) *glyph {
}
if ch.empty() {
return nil
// The glyph doesn't have its size but might have valid 'advance' parameter
// when ch is e.g. space (U+0020).
return &glyph{
char: ch,
atime: now,
}
}
if !ok {