Fonts questions

I’ve been playing with text…Is it possible to change:

Line-height?

Letter spacing?

Use a custom font?

Thanks!

check out the font (http://twolivesleft.com/Codea/Reference/#detail/index/font) and fontSize (http://twolivesleft.com/Codea/Reference/#detail/index/fontSize) functions.

Any way to use a custom font?

.@david19801 There are ways, but they aren’t pretty. Both Bortels and I devised ways to do it before TLL implemented fonts in the main code. The various discussions will be buried deep in the forum. You can get Bortels’ code from the Codea wiki https://bitbucket.org/TwoLivesLeft/core/wiki/UserContributedLibraries - and I see that Nat Pryce has a font there as well. You can get my code from my library: http://www.math.ntnu.no/~stacey/HowDidIDoThat/iPad/Codea.html.

Scary stuff. I’ll have to stick with courier until I level up.

How about the line spacing and line-height? And way to change those on a text block or plans to implement?

Not that I know of. You could do it manually by splitting the line yourself and then starting the next line at a different height.

Just want to add, textSize doesn’t give correct height on wrapped (multi line) text…

Are you sure? If there are 2 lines, textSize gives 2x the line height, that’s what it is supposed to do. I use it in my current ‘windows’ project and i havent noticed anything…