Tweak text sizing slightly
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
091f6a455e
commit
7f14289760
4
chars.go
4
chars.go
@ -74,8 +74,8 @@ var charWidths = map[string]float64{
|
|||||||
"%": 18.416671752929688,
|
"%": 18.416671752929688,
|
||||||
"^": 9.683334350585938,
|
"^": 9.683334350585938,
|
||||||
"*": 9.683334350585938,
|
"*": 9.683334350585938,
|
||||||
"(": 7,
|
"(": 7.8,
|
||||||
")": 7,
|
")": 7.8,
|
||||||
"-": 10.300003051757812,
|
"-": 10.300003051757812,
|
||||||
"_": 9.73333740234375,
|
"_": 9.73333740234375,
|
||||||
"=": 14.333328247070312,
|
"=": 14.333328247070312,
|
||||||
|
6
main.go
6
main.go
@ -214,6 +214,12 @@ func calculateHeight(tweet anaconda.Tweet) int64 {
|
|||||||
lineHeight = 32.0
|
lineHeight = 32.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(word, "\n") {
|
||||||
|
height += lineHeight
|
||||||
|
lineWidth = 0
|
||||||
|
word = strings.TrimPrefix(word, "\n")
|
||||||
|
}
|
||||||
|
|
||||||
if strings.Contains(word, "\n") {
|
if strings.Contains(word, "\n") {
|
||||||
height += lineHeight
|
height += lineHeight
|
||||||
lineHeight = 28.0
|
lineHeight = 28.0
|
||||||
|
Loading…
Reference in New Issue
Block a user