Results 1 to 6 of 6

Thread: Using fonts and sizes with LUA?

                  
   
  1. #1

    Exclamation Using fonts and sizes with LUA?

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

  2. #2
    DCEmu Rookie
    Join Date
    Dec 2005
    Location
    Tauranga, New Zealand
    Posts
    100
    Rep Power
    67

    Default

    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.

  3. #3

    Default

    Incredible, I found everything you spoke of. TYTYPL0x for j00r help, sir. Have a wonderful evening!

  4. #4

    Default

    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.

  5. #5

    Default

    You should try making your own fonts in paint or another graphics program, like The Gimp or photoshop.

  6. #6
    DCEmu Coder drEDN4wt's Avatar
    Join Date
    Aug 2005
    Location
    U.K.
    Posts
    172
    Rep Power
    0

    Default

    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)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •