Page 1 of 1
Stretching fonts?
Posted: Mon Jun 24, 2013 2:14 am
by SteveTX
I've mocked up my interface in Illustrator, but LC doesn't seem to have an obvious way of letting me squeeze a font to 90% of its normal width. Is there a method for this or should I take the TTF and modify it and try to include it in the stack? Can I use a custom TTF on iOS and Android mobile platforms?
Re: Stretching fonts?
Posted: Mon Jun 24, 2013 8:56 am
by Mark
Hi,
That's right, you can't do kerning in LiveCode. You'll have to find a different solution. You can make a new font or put the text into a transparent field, import a snapshot of the field to an image object and resize the image object.
Kind regards,
Mark
Re: Stretching fonts?
Posted: Mon Jun 24, 2013 11:39 am
by SteveTX
Thanks for the info, Mark. I see that revFontLoad only applies to Windows and Mac, not iOS / Android, so I presume making a custom font work native on the device won't work. Clearly the answer is to use images from my mockup, luckily the text is almost entirely static.
To that end, is there a list of fonts that are native to both iOS and Android so we know what fonts will work on those devices?
Re: Stretching fonts?
Posted: Mon Jun 24, 2013 11:45 am
by Mark
Hi,
You can include a font with your standalone on iOS and Android and it will work. For info about fonts, you
can search the internet. You can also use the fontNames function.
Kind regards,
Mark
Re: Stretching fonts?
Posted: Mon Jun 24, 2013 6:13 pm
by SteveTX
How does the include for fonts on iOS/android work if not through revFontLoad?
Re: Stretching fonts?
Posted: Mon Jun 24, 2013 6:21 pm
by Mark
Hi,
Just include the font in the standalone, e.g. in the Copy Files section of the standalone settings window. The font should load automatically and will then be available for use. Make sure that the font file is in the same directory as the engine, i.e. add the individual files and not a folder.
Kind regards,
Mark
Re: Stretching fonts?
Posted: Tue Jun 25, 2013 9:51 pm
by SteveTX
For future, I found a great solution. It turns out Google has released some new open license fonts as per ice cream sandwich. Most fonts, ttf/otf or otherwise, aren't designed for small resolutions and look bad on devices. This one looks great, and is a humanist sans serif.
Re: Stretching fonts?
Posted: Wed Jun 26, 2013 7:09 am
by Simon
Hi Steve,
For future, I found a great solution
Could you be a bit more specific?
I'm glad you found something useful, but you've only half shared it. The font name? Is it Roboto or a newer one?
Thanks,
Simon
Re: Stretching fonts?
Posted: Sat Jun 29, 2013 1:34 am
by SteveTX
Roboto indeed. Droid Sans is alright as well. Can't wait to see some droid/google fonts on iOS builds.