From 2a15e4fc9b148f4c8bee30cda8d8f66ea556612f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Cuervo?= Date: Thu, 18 May 2023 15:11:58 -0400 Subject: Add font scaling --- virtual-programs/label.folk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'virtual-programs') 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 } } -- cgit v1.2.3