Flow/wrap text into an irregular shape

Scott Rossi scott at tactilemedia.com
Fri Dec 27 21:01:55 EST 2013


Hi Roger:

I assume you're asking because you want to do this by script, rather than
manually trimming text to fit.  I've done text wrapping before using a
combination of the formattedText property and counting lines of text that
are displayed, wordOffsets, etc.  The formattedRect property might be
useful too.

Two ways you might do this are 1) use a single field with htmlText and
breaking lines using <br>, but you'll have to keep track of these
(add/delete) if the text has to flow into the shape, or 2) use separate
fields that vertically spaced using the desired line height of your text
and break the text across the fields as needed.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 12/27/13 8:20 AM, "Roger Eller" <roger.e.eller at sealedair.com> wrote:

> Imagine a multi-line text field which overlays a triangle polygon, which
>is wide at the top, and comes to a point at the bottom.  I want the text
>to
>detect the edges of the triangle and wrap at those edges.  The result
>would
>be a triangle shaped body of text (centered).  My question to you is "How
>can this be achieved?"
>
>~Roger
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
>






More information about the Use-livecode mailing list