Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
TextField font size — Gideros Forum

TextField font size

Unknown Member
edited June 2012 in General questions
Hi,

I started exploring Gideros recently and building my first app. So I'm a newbie to Gideros. I'm wondering how can I change the font size? I don't want to use custom font. I just want to use the system default font but change it's size. I know I can use TTFont.new("fontfile.ttf", size) to create a font handle with the desired size. But I don't have the font file. It seems the default font on iPhone 4S is Helvetica Neue, but the default size I get by doing TextField.new(nil, "blahblah") is really tiny.

Is there a way to do something like TextField.new(nil, "blahblah", 40) or textfield.setFontSize(40)?

Your help is much appreciated. Thank you!

Regards,
Kapil

Likes: Zizanyman

+1 -1 (+1 / -0 )Share on Facebook

Comments

  • evsevs Member
    You can do this, but only if you want that 8-bit look :D
     
    local text =  TextField.new(nil, "System Scaled")
     
    text:setScale(2)
     
    text:setPosition(application:getDeviceWidth() / 2 - text:getWidth() / 2,
                     application:getDeviceHeight() / 2)
     
    stage:addChild(text)
    cheers

    evs
    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.