Vertical Text

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Vertical Text

Post by ghettocottage » Mon Apr 06, 2015 3:10 am

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.

Klaus
Posts: 14189
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Vertical Text

Post by Klaus » Mon Apr 06, 2015 10:30 am

Hi ghettocottage,
ghettocottage wrote:Is vertical text a thing we can do in Livecode?
no.

Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Vertical Text

Post by FourthWorld » Mon Apr 06, 2015 2:58 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Vertical Text

Post by ghettocottage » Mon Apr 06, 2015 4:26 pm

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Vertical Text

Post by FourthWorld » Mon Apr 06, 2015 5:47 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Vertical Text

Post by ghettocottage » Wed Apr 08, 2015 4:28 pm

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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Vertical Text

Post by FourthWorld » Wed Apr 08, 2015 4:40 pm

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
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Vertical Text

Post by ghettocottage » Wed Apr 08, 2015 4:49 pm

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...

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Vertical Text

Post by FourthWorld » Wed Apr 08, 2015 5:17 pm

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....
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply