Submit Your Own Code

PSP Lua CodeBase : Load/Print a Font

Description:
An example of using your own font. (.TTF file)

-- EVILMANA.COM PSP LUA CODEBASE
-- www.evilmana.com/tutorials/codebase
-- Load/Print a Font
-- SUBMITTED BY: EminentJonFrost

snapitc = Font.load("snapitc.TTF") --load font, extension doesnt have to be capitalized

snapitc:setPixelSizes(0,10) --you HAVE to specify size white = Color.new(255, 255, 255)

while true do

screen:clear()

screen:fontPrint(snapitc,100,100,"Custom Font",white)

screen.waitVblankStart()

screen.flip()

end

--just a side note, if you want a font from your PC, --go to C:\WINDOWS\Fonts

Back to CodeBase
 

Please welcome daryy, our newest member.

Who's Online: 5 Guests, 0 Users

Total Members: 556
Total Posts: 13060
Total Topics: 1480
Total Categories: 8
Total Boards: 35

Recent Posts:

Re: Lua 5.1.4 help. by daryy
Re: PGELua Help - need term for a special rotation fix (mathematical issue) by yaustar
Re: Lua Loader? by Buddy4point0
Re: Lua Loader? by osgeld
Re: Lua Loader? by acer5050
Re: Lua Loader? by bumuckl
Re: Lua Loader? by acer5050
Re: Lua Loader? by bumuckl


Copyright © 2006-2007 www.EvilMana.com All rights reserved.
EvilMana Logo by emcp and Charlie