Is this the solution? Is the riddle finally solved?

This commit is contained in:
Hamcha 2016-06-20 17:50:48 +02:00
parent aafa163bc8
commit be87f805cd

View file

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