BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links




Closed Thread
 
LinkBack Thread Tools
  (#1 (permalink)) Old
arifzaman Offline
Thumbs Must Hurt
 
Posts: 93
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Question Font Style! - 08-09-2007, 08:09 AM

Hi all,

I've already changed my default FONT by using "net.rim.device.api.ui.Font" and "net.rim.device.api.ui.FontFamily" classes for my application.

Now, my intension is to retrieve new FONT that should be as like as my default settings which I made before in my application, but only differerece would be in FontStyle as ITALIC. I know this can be done by going with the following code:

Code:
Font.setDefaultFont(defaultFont.derive(Font.ITALIC));
But I don't want to do that.

I do like to use "javax.microedition.lcdui.Font" class to meet my requirements. Before that I’ve to ensure that the settings shouldn't be changed which one I’ve made before using "net.rim.device.api.ui.Font" and "net.rim.device.api.ui.FontFamily" classes.

I know, this is a silly question. But it's required to point to my interest. FYI, I’ve extends MainScreen from Canvas class.

Help me with your valuable feedback.

Thanks in advance!

Thanks,
ARIF

Last edited by arifzaman : 08-13-2007 at 01:02 AM.
   
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
arifzaman Offline
Thumbs Must Hurt
 
Posts: 93
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Question 08-13-2007, 02:16 AM

Hi all,

I’ve gained new FONT with my expected font style by using “public static Font getFont(int face, int style, int size)” method of “javax.microedition.lcdui.Font” class. Code is following:

Code:
Font defaultFont = Font. getDefaultFont();
Font newFont = Font.getFont(defaultFont.getFace(), STYLE_ITALIC, defaultFont.getSize());
But the problem is, it changes the size of the FONT that I made before by setting default font using net.rim.device.api.ui.Font for my application. Since getFont method of “javax.microedition.lcdui.Font” requires size parameter as one of SIZE_SMALL, SIZE_MEDIUM, or SIZE_LARGE.

Is there any other option to solve this problem using “javax.microedition.lcdui.Font” class? My intension is only to change STYLE of my default settings.

Any help will be appreciated!

Thanks,
ARIF
   
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-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1