BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-10-2007, 01:29 AM   #1 (permalink)
New Member
 
abhilasha_dubey's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: CLDC
Posts: 8
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please Login to Remove!

Dear all,
I have designed an application in j2me for Blackberry 8800/8700.
In this if i set the font to the default font of the device.Now if the user changes the default font of the device then the display of the text is changing and the UI is messed up.How i prevent this effect.Like even if the user changes the device font and its size ,the application should take up one particular font(say BBMillbank) and display its text accordingly. I am new to mobile programming plzzzzzz help me out ???
Offline  
Old 10-10-2007, 01:48 AM   #2 (permalink)
BBF Moderator
 
John Clark's Avatar
 
Join Date: Jun 2005
Model: Z30
OS: 10.2.1.x
PIN: s & needles
Carrier: AT&T
Posts: 34,686
Post Thanks: 4
Thanked 100 Times in 72 Posts
Default

** Moved to Developer's Forum **
Offline  
Old 10-10-2007, 02:14 AM   #3 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
ff = FontFamily.forName("BBMillbankTall");  
font = ff.getFont(FontFamily.SCALABLE_FONT, 12).derive(Font.BOLD);
Font.setDefaultFont(font)
this would set the font in your application to BBMillbankTall, 12, bold.
You can also set the font for single elements like fields etc.

Cosider it well to use a fixed layout though as different devices have different screen sizes and a solution that fits one may look horrible on another. You can maybe integrate an option screen that allows to set the used font internally.
__________________
java developer, Devinto, hamburg/germany
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.