yasin 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
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
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
margin
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 unti
On Oct 12, 2019, at 8:05 PM, Brian Milby via use-livecode
wrote:
>
> You probably could get close with math but line breaks would not be uniform
> and will introduce variability. You could probably get it down to 2 or 3
> checks.
This.
Font scaling itself is nonlinear enough, but the way m
Sannyasin,
I've been doing this for years. Works well...
on doShrinkToFit lFldID,startingSize,minSize
set the textSize of lFldID to startingSize
repeat until the formattedHeight of lFldID <= the height of lFldID
set the textSize of lFldID to (the textSize of lFldID - 1)
if the textSi
In the repeat loop set the attributes of the empty field and use measureText
(or measureUnicodeText) to compute the textSize. As a last step fill the field.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, u
But "line breaks" is another known factor, based on X… which still leaves us on
variable to find.
Brian wrote:
You probably could get close with math but line breaks would not be uniform and
will introduce variability. You could probably get it down to 2 or 3 checks.
BR: Hmm I figured that a r
You probably could get close with math but line breaks would not be uniform and
will introduce variability. Â You could probably get it down to 2 or 3 checks.
Thanks,
Brian
On Oct 12, 2019, 11:02 PM -0400, Sannyasin Brahmanathaswami via use-livecode
, wrote:
> BR: Hmm I figured that a repeat loop
BR: Hmm I figured that a repeat loop would do that, but was look for a
"one-off-equation"
According to the "laws of math" (ha... algebrait has been
such a long time; I could be wrong) if you have single unknown variable , X,
and all others are known factors, you would, in
On 10/12/2019 8:20 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
Assuming one is not putting whole pages into small fields, does any one have an
efficient run time LC algorithm that will set the font size so that the
formatted text will all appear in the field without needing to scroll
11 matches
Mail list logo