From aafa163bc8f39b9949ed1a6eb3eb5bd3dc084e12 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Mon, 20 Jun 2016 17:46:55 +0200 Subject: [PATCH] Tweaks --- mods/unsplash.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/unsplash.go b/mods/unsplash.go index 4fa0a7e..2e7d4e8 100644 --- a/mods/unsplash.go +++ b/mods/unsplash.go @@ -125,10 +125,10 @@ func unsplash(broker *tg.Broker, update tg.APIMessage) { // Still too big? Decrease font size again iter := 0 - for width*1.1 > iwidth && iter < 10 { + for width*1.05 > iwidth && iter < 10 { log.Println("Warning, resizing!") left, top, right, bottom = gc.GetStringBounds(texts[longid]) - scale *= (0.8 - 0.1*float64(iter)) + scale *= (0.9 - 0.1*float64(iter)) gc.SetFontSize(scale) width = right - left iter++