summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorAndrés Cuervo <andrescuervor@gmail.com>2023-05-18 19:11:58 +0000
committerAndrés Cuervo <andrescuervor@gmail.com>2023-05-18 19:11:58 +0000
commit2a15e4fc9b148f4c8bee30cda8d8f66ea556612f (patch)
treedcbe497283572a59464a1a2fbb278c48b0b983b9 /virtual-programs
parentDifferent style of fillQuad and quads in april tags (diff)
downloadfolk-2a15e4fc9b148f4c8bee30cda8d8f66ea556612f.tar.gz
folk-2a15e4fc9b148f4c8bee30cda8d8f66ea556612f.zip
Add font scaling
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/label.folk4
1 files changed, 2 insertions, 2 deletions
diff --git a/virtual-programs/label.folk b/virtual-programs/label.folk
index 03f92daf..eef544a8 100644
--- a/virtual-programs/label.folk
+++ b/virtual-programs/label.folk
@@ -14,11 +14,11 @@ When /thing/ has region /region/ {
if {$text eq ""} { return }
set lines [split $text "\n"]
- set fontSize 12
+ set fontSize 1
for {set lineNum 0} {$lineNum < [llength $lines]} {incr lineNum} {
set shouldFlip [expr {abs($radians) < 1.57}]
if {$::isLaptop} { set shouldFlip false}
- set ly [expr {$shouldFlip ? $y+$lineNum*18 : $y+$lineNum*18}]
+ set ly [expr {$shouldFlip ? $y+$lineNum*$fontSize*18 : $y+$lineNum*$fontSize*18}]
Display::text device $x $ly $fontSize [lindex [expr {$shouldFlip ? [lreverse $lines] : $lines }] $lineNum] $radians
}
}