Will share handler later today. I am in the middle of a pressing project.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net
Phone: 518-636-3998 Ex:11
Cell: 518-796-9332

-----Original Message-----
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Sannyasin Brahmanathaswami via use-livecode
Sent: Monday, October 14, 2019 3:21 PM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: Set font dynamically to fit text

Dan: Thanks for the handler!

Ralph: Actually that last solution offered was fromr Dan Friedman not mine. 
Can you put your two handlers on the list?  " I also have an option to fit 
either by height or width." 

Doc Hawk:  I give in 😊, " Font scaling itself is nonlinear enough, but the way 
margins scale with font size is downright psychotic " that's two unknowns in 
the equation. So iterationis required


============
Ralph wrote
I use the same technique as BR with a couple of diffs. I originally went down 
by 1's like BR but changed it for increased performance. I set the textsize to 
a large number(I like BR's initial size option) I then go down by 8s, add 7, 
down by 4s, add 3, down by 2s, add 1 finally down by ones until it fits. Each 
of the 4 loops has a check for min size so it down not go down below 2. I guess 
2 is too low but it's been working.
I also have an option to fit either by height or width. 


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to