1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-29 22:21:24 +00:00

Fix slight calculation bug in text height

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-08-09 17:44:09 +02:00
parent f9ef030362
commit 21a30d8e18
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -91,7 +91,7 @@ func (t *textOnImageRenderer) drawText(c *freetype.Context, text string, textCol
} }
var ( var (
yTotal = (int(c.PointToFixed(fontsize)/64))*len(textLines) + len(textLines)*2 yTotal = (int(c.PointToFixed(fontsize)/64))*len(textLines) + (len(textLines)-1)*2
yLineTop = int(float64(sd.IconSize())/2.0 - float64(yTotal)/2.0) yLineTop = int(float64(sd.IconSize())/2.0 - float64(yTotal)/2.0)
) )