Page 1 of 1

Vertical Text

Posted: Mon Apr 06, 2015 3:10 am
by ghettocottage
I could not find the "Layout and Typography" forum, so thought maybe this would be the place to ask:

Is vertical text a thing we can do in Livecode? (not an image, don't want that...) I have been tinkering, but not any obvious tools to rotate text.

I was reading some Swiss Typography books and inspired to change my layouts.

Re: Vertical Text

Posted: Mon Apr 06, 2015 10:30 am
by Klaus
Hi ghettocottage,
ghettocottage wrote:Is vertical text a thing we can do in Livecode?
no.

Best

Klaus

Re: Vertical Text

Posted: Mon Apr 06, 2015 2:58 pm
by FourthWorld
Why not an image? For editing you'll probably want it horizontal anyway and a field is good for that, so for display it usually doesn't matter if it's a field or an image.

Re: Vertical Text

Posted: Mon Apr 06, 2015 4:26 pm
by ghettocottage
Why not an image?
For this particular thing I am working on, where there will be changes happening (new tabs added/removed) over the course of time, I don't want to have to mess with images every time something new is added.

Harkening back to the web-design days when everything was done with images (and ghastly tables)...scrambling to find your photoshop documents that had the layered images to add a new menu item to a website you built a year ago.

Re: Vertical Text

Posted: Mon Apr 06, 2015 5:47 pm
by FourthWorld
In many programs that allow rotation of text objects they revert to a horizontal rendering during editing, and then go back to the rotating rendering when the edit field closes. You could do the same here, with an edit mode of sorts that hides the image and then shows an editing field, re-rendering the rotated version when done. It's a bit of work but not too much, and beats not having it at all.

Re: Vertical Text

Posted: Wed Apr 08, 2015 4:28 pm
by ghettocottage
FourthWorld wrote:In many programs that allow rotation of text objects they revert to a horizontal rendering during editing, and then go back to the rotating rendering when the edit field closes. You could do the same here, with an edit mode of sorts that hides the image and then shows an editing field, re-rendering the rotated version when done. It's a bit of work but not too much, and beats not having it at all.
Are you saying that Livecode has the ability to convert a text-field into an image?

Re: Vertical Text

Posted: Wed Apr 08, 2015 4:40 pm
by FourthWorld
Yep - you can use "export snapshot" to put the rendered object image data into a variable, and then put that into an image object, e.g.:

Code: Select all

on mouseUp
   export snapshot from fld "MyEntryFld" with effects to tImgData as PNG
   set the angle of img "myRotatableImg" to 0 -- reset
   set the text of img "myRotatableImg" to tImgData
   set the angle of img "MyRotatableImg" to 45
end mouseUp

Re: Vertical Text

Posted: Wed Apr 08, 2015 4:49 pm
by ghettocottage
FourthWorld wrote:Yep - you can use "export snapshot" to put the rendered object image data into a variable, and then put that into an image object, e.g.:

Code: Select all

on mouseUp
   export snapshot from fld "MyEntryFld" with effects to tImgData as PNG
   set the angle of img "myRotatableImg" to 0 -- reset
   set the text of img "myRotatableImg" to tImgData
   set the angle of img "MyRotatableImg" to 45
end mouseUp

Veeewwwy Intwesting...

Re: Vertical Text

Posted: Wed Apr 08, 2015 5:17 pm
by FourthWorld
It gets even better: not only is that useful for your current interest in coming up with a rotated text solution, but snapshots aren't limited to objects on the current card - you can render any object in any stack file at any time. And you can even specify a width and height to create thumbnails - that's how the Project Browser does it.

Very interesting indeed....