mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
text: Avoid creating 0-sized image
This commit is contained in:
parent
dff492955d
commit
6caebc2310
@ -148,6 +148,7 @@ func getGlyphImages(face font.Face, runes []rune) []*glyphImage {
|
||||
neededGlyphs[i] = b
|
||||
}
|
||||
|
||||
if len(neededGlyphs) > 0 {
|
||||
// TODO: What if w2 is too big (e.g. > 4096)?
|
||||
w2 := 0
|
||||
h2 := 0
|
||||
@ -189,6 +190,7 @@ func getGlyphImages(face font.Face, runes []rune) []*glyphImage {
|
||||
|
||||
x += w
|
||||
}
|
||||
}
|
||||
return imgs
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user