This commit is contained in:
Hamcha 2016-06-20 17:52:06 +02:00
parent be87f805cd
commit ca4ba5229a

View file

@ -134,8 +134,8 @@ func memegen(broker *tg.Broker, update tg.APIMessage) {
iter := 0 iter := 0
for width > iwidth && iter < 10 { for width > iwidth && iter < 10 {
log.Println("Warning, resizing!") log.Println("Warning, resizing!")
left, top, right, bottom = gc.GetStringBounds(texts[longid])
gc.SetFontSize(scale * (0.8 - 0.1*float64(iter))) gc.SetFontSize(scale * (0.8 - 0.1*float64(iter)))
left, top, right, bottom = gc.GetStringBounds(texts[longid])
width = right - left width = right - left
iter++ iter++
} }