Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Label fonts

Hi,

Im wondering how to use the font parameter, because i want to set a labels font to be something else then the default one. I have tried alot but dont seem to get it working.

Any advice?

— asked March 30th 2010 by Jordan F
  • family
  • font
0 Comments

2 Answers

  • Accepted Answer

    try this:

    var label = Ti.UI.createLabel({
    text:'label',
    color:'#ffffff',
    font:{fontSize:20,fontFamily:'Marker Felt', fontWeight:'bold'}
    });
    win.add(label);
    
    — answered March 30th 2010 by Glenn Tillemans
    permalink
    1 Comment
    • How is this done in XML?

      — commented January 31st 2014 by P S
  • wow quick reply, thanks looks like this was just what i needed

    — answered March 30th 2010 by Jordan F
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.