Join Our 3 MILLION+ Members Today! Register Here | Login
Go Back   BlackBerry Forums at CrackBerry.com > BlackBerry Professionals > App Developers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
    Thread Author   #1  
Old 09-03-2010, 11:31 AM
CrackBerry Newbie
 
Join Date: Sep 2010
Posts: 1
Likes Received: 0
Thanked 0 Times in 0 Posts
Default How can I see a list of fonts available in my blackberry?

Right now I'm setting a font to my application, but I was just following an example. How can I know what fonts I have available to me?

Code:
 FontFamily alphaSansFamily;
    try {
    	alphaSansFamily = FontFamily.forName("BBAlpha Serif");
    	Font appFont = alphaSansFamily.getFont(Font.PLAIN, 9,
    			Ui.UNITS_pt);
    	setFont(appFont);
    } catch (ClassNotFoundException e) {
    	e.printStackTrace();
    }
Thanks!
Reply With Quote Tip this Post
  #2  
Old 09-03-2010, 02:12 PM
Developer - ToySoft
Device(s): 9800 (Torch)
Carrier: Fido
 
Location: Canada
Join Date: May 2008
Posts: 2,756
Likes Received: 48
Thanked 80 Times in 54 Posts
Default

use this

//Get all fonts available on the BlackBerry
private FontFamily fontFamily[] = FontFamily.getFontFamilies();

use this control to display the popup of avail fonts

ObjectChoiceField _pickFont = new ObjectChoiceField("Text font:",
fontFamily, 0);

you can then use the add method to add it to the form

eg: add(pickFont);
__________________
Visit our website www.toysoft.ca for Cool BlackBerry Apps!
Follow us @ http://twitter.com/toysoft or visit us at AppWorld
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > App Developers   How can I see a list of fonts available in my blackberry?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes