Text letting, or spacing

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Cool Dave
Posts: 35
Joined: Mon Jun 25, 2012 8:44 pm

Text letting, or spacing

Post by Cool Dave » Wed Jun 27, 2012 6:10 pm

I am making an app which has a sign with editable type. But this type has to look exactly like the type on a real sign. I am using impact font, because that is the only standard font that looks anything like a real sign.

The problem is, to fit enough characters on the sign, I need to downsize the type so much that it is far too short in height. But the problem is not the font itself, it is the spacing between the letters.

Is there a way to adjust the text letting, aka spacing in Rev? If not, I will create multiple fields, each containing just one character. However, I don't know how to make them move into position based on their size. (An 'M' is bigger than an 'I') The only way I know is to manually figure out the width of each character and then use that to position each field.

Snappy performance would be nice. If anyone know a different way to do it, besides those above or using images with the letters on them, any help would be appreciated.

Thanks,
Dave

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Text letting, or spacing

Post by jmburnod » Wed Jun 27, 2012 7:17 pm

Hi Dave,
However, I don't know how to make them move into position based on their size. (An 'M' is bigger than an 'I')
Look at "formattedwidth" in the LC dictionary.
It return the width needed to display the content of an object

Best regards

Jean-Marc
https://alternatic.ch

Cool Dave
Posts: 35
Joined: Mon Jun 25, 2012 8:44 pm

Re: Text letting, or spacing

Post by Cool Dave » Wed Jun 27, 2012 7:34 pm

Thanks Jean-Marc,

That will solve the problem of figuring out where to put the text fields. Too bad LC doesn't have text letting, though.

I think I should be able to figure out some code to send the text to the fields with a decent amount of speed. I guess I really ought to upgrade to a newer version of LC. It's just too expensive to keep up with for me.

Thanks again,
Dave

Post Reply