PDA

View Full Version : Using fonts and sizes with LUA?



Virginia Calm
March 8th, 2006, 04:45
Hey there. I *think* I read earlier today on a strange LUA guide that it is indeed possible to make things show up in an alternate font and size. For example, I'm familiar with the:

screen:print(200, 100, "Look! I made text appear!", red)

Now when we put that in, the printed message is writen in Helvetica or whatever. I'm interested in printing in Comic Sans MS or Times New Roman, but I don't know exactly what our options are in terms of using the screen:print command.

Please, if you have an answer, write it very simply and tell me what all I can do with the screen:print command. :) Thanks for your time!!!

TheEmulatorGuy
March 8th, 2006, 08:58
Put your font in the folder... load the font, then use screenFontPrint... In other words, look in the example folder for an example font use and read the functions list.

Virginia Calm
March 8th, 2006, 23:12
Incredible, I found everything you spoke of. TYTYPL0x for j00r help, sir. Have a wonderful evening!

Virginia Calm
March 8th, 2006, 23:40
Hmm, new problem. I don't think it supports .ttf files, which is obviously the only thing I have. Of course, I'm just using basic fonts, so if you know of a site where I can download either the fonts in a compatible format OR a program that can convert my fonts, I'd appreciate that. :)

flashmasterfong
March 16th, 2006, 02:49
You should try making your own fonts in paint or another graphics program, like The Gimp or photoshop.

drEDN4wt
March 25th, 2006, 18:19
it does use ttf's .. download them from www.myfonts.com

bigfont = Font.load("afont.ttf")
bigfont:setPixelSizes(0, 90)
screen:fontPrint(bigfont,50,50,text,color)


oh btw...
you cant print fonts onto a black image
....if you want black, use

color=Color.new(1,1,1)