Fit text in a field

Dr. Hawkins dochawk at gmail.com
Tue Nov 4 12:15:40 EST 2014


On Tue, Nov 4, 2014 at 6:01 AM, Pyyhtiä Christer <christer at mindcrea.com>
wrote:

> Is there a known way of fitting a specific (variable from case to case)
> text string into a field with a definition of the font and min&max text
> size? The other parameter would be wrap/no-wrap to tell you want just a
> one-liner. For multi-liner, anyone been coding in hyphenation algorithm
> (for English) in LC?


Look at the formattedTextWidth property.  If nothing else, you can
calculate point sizes in a hidden field until you find the best fit.


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462



More information about the use-livecode mailing list