How to get working Font:getTextSize

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
xperiments
Posts: 3
Joined: Tue Jan 10, 2006 9:57 pm

How to get working Font:getTextSize

Post by xperiments »

I cant get a return value from Font:getTextSize('ajjjjja')

example

standard = Font.load('standard.ttf')
standard:setPixelSizes(0,8)

test = standard:getTextSize('some text')

now test = nil.... ummm??? not a table or object
where can I get textWidth & textHeight values?

Anyone can help me ?
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

Have you tried it on LuaPlayer v0.16?

In v0.15 the variable returns as nil. I would suggest updating. That may aleviate your problem.
xperiments
Posts: 3
Joined: Tue Jan 10, 2006 9:57 pm

Post by xperiments »

Thanks, I will test in an hour .... and send comments
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

I didn't tested this function and as Murphy's law says, it doesn't work. I've added it to the bugs section at http://wiki.ps2dev.org/psp:lua_player:todos for the next release.
Post Reply