strategies for non-horizontal text orientation

Roger Guay irog at mac.com
Sat Jun 13 15:15:53 EDT 2009


I was also confronted with this problem of providing non-horizontal  
text and simply gave up on it. Thanks to Kay C Lan for this solution,  
and also for showing once again that anything can be achieved with  
RunRev and creative thinking.

Cheers,
Roger


On Jun 13, 2009, at 10:00 AM, use-revolution-request at lists.runrev.com  
wrote:

> Haven't done it before, but just had a quick play around and was quite
> impressed with what I could achieve.
>
> It doesn't look as though it would be impossible to do  
> programmatically, but
> it would certainly be easier with a mono-spaced font. A coupe of  
> things I
> note, for Monaco:
>
> There is no difference between the formattedWidth of the field if  
> the text
> is horizontal or 45 degrees.
> The relationship seems to be, textHeight needs to be set to half the
> textSize
> Creating the content of the label field, starrt with two blank lines  
> then
> simply loop through each char of 'my label here' placing each char  
> on a new
> line and increment the number of preceding spaces by 1.
> get the formattedWidth and formattedHeight to determine how big the  
> label
> field needs to be.
> Conveniently, with margins set to 0, and the field set to it's  
> formatted
> width and height, the last letter of the content is nicely placed in  
> the
> bottom right corner.
> Tested for font size 10 to 36.
>
> In the case where all the labels, Font Style and Size are all  
> predefined, ie
> not user modifiable, I'd create an array, saved in a custom  
> property, the
> key would be the label, the element a 3 item list, height, width,  
> content
> (the label with the leading blank lines and all the chars with their
> preceding spaces on their own lines)
>
> Extracting and setting the data would be very quick.
>
> No problems printing.
>
> HTH




More information about the use-livecode mailing list