On 11/4/2014, 8:01 AM, Pyyhtiä Christer 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?
Basically you have to just brute-force your way through it one test at a time. Set the templateField to the font and wrap settings as needed. Put the text into it and check the formattedwidth and formattedheight. If it's bigger than the max or smaller than the min, adjust the text size and try it again. Lock messages to make it a little faster.
-- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com _______________________________________________ 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