Tweak text sizing slightly

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
master
Marcus Noble 8 months ago
parent 091f6a455e
commit 7f14289760
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78
  1. 4
      chars.go
  2. 6
      main.go

@ -74,8 +74,8 @@ var charWidths = map[string]float64{
"%": 18.416671752929688,
"^": 9.683334350585938,
"*": 9.683334350585938,
"(": 7,
")": 7,
"(": 7.8,
")": 7.8,
"-": 10.300003051757812,
"_": 9.73333740234375,
"=": 14.333328247070312,

@ -214,6 +214,12 @@ func calculateHeight(tweet anaconda.Tweet) int64 {
lineHeight = 32.0
}
if strings.HasPrefix(word, "\n") {
height += lineHeight
lineWidth = 0
word = strings.TrimPrefix(word, "\n")
}
if strings.Contains(word, "\n") {
height += lineHeight
lineHeight = 28.0

Loading…
Cancel
Save