I have been working on a project using the tahoma.ttf that came bundled with
@ar2rsawseen's very useful game template and it has been working fine. However when I switch out the font for any .ttf font that I download from Google Web Fonts, changing to any scene containing the font will lock up the Gideros iOS Player. The application becomes unresponsive and I can see it pegging CPU at 100% and memory usage continually increasing and I have to force kill it. The same occurs on the Gideros iOS Player on my device (iPhone5). There are no errors in the shown in the player or any debug info.
Is there something I need to do with the .ttf files from Google Web Fonts (or other sources) to make them compatible with Gideros before they can be used?
Thanks.
Comments
Edit: Actually, I'm not sure that is the same issue now I read your post again. I've been having a problem with ttf periodically crashing the player but not every time.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Which version of Gideros are you using @krisis?
As far as I know there is no need to do anything with font if it's in ttf format
http://www.google.com/webfonts/download?kit=hWBMzThW3MSPyUN8rdo-Y_esZW2xOQ-xsNqO47m55DA
Let me try with the latest version and see if the issue is still happening...
I'm setting up 3 fonts under a global config:
conf = {
textFont = TTFont.new("fonts/Ubuntu/Ubuntu-Regular.ttf", 20),
titleFont = TTFont.new("fonts/Ubuntu/Ubuntu-Regular.ttf", 40),
blockFont = TTFont.new("fonts/Ubuntu/Ubuntu-Regular.ttf", 60),
...
}
And it's being used on a Help screen for a few paragraphs of text, such as:
local title = TextWrap.new("OVERVIEW", 100, "left", conf.titleFont)
title:setPosition(-layer:getWidth()/2 + 30, -layer:getHeight()/2 + 100)
title:setTextColor(0xffffff)
layer:addChild(title)
The Gideros Player locks up as soon as I try and switch scenes to the Help screen.
Using "fonts/tahoma.ttf" this works fine...
The offending code was:
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
the way to add the hotspot tapable buttons is
With the text it is as simple as
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Appreciate the quick replies in this thread.
I'm trying to make the libs for as general use as possible, but usually it gets mostly tested for my needs in that particular situation.
So sorry for any inconvenience