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
Carrier: CLDC
Posts: 8
Post Thanks: 0
Thanked 0 Times in 0 Posts

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 ???
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,715
Post Thanks: 6
Thanked 115 Times in 82 Posts

** Moved to Developer's Forum **
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

ff = FontFamily.forName("BBMillbankTall");  
font = ff.getFont(FontFamily.SCALABLE_FONT, 12).derive(Font.BOLD);
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

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.