Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 39
Registered: ‎02-21-2012
My Device: Blackberry 9300
My Carrier: Developer

Using custom fonts

I am developing an application and i want to use some custom fonts in it..I am using os 5.How to set custom font in my app??

Developer
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer

Re: Using custom fonts

once check this link you can get answer 

 

custom font in blackberry

New Developer
Posts: 39
Registered: ‎02-21-2012
My Device: Blackberry 9300
My Carrier: Developer

Re: Using custom fonts

I am using this code.

 

      if (FontManager.getInstance().load("HelveticaBold.Ttf", "MyFont",FontManager.APPLICATION_FONT) == FontManager.SUCCESS);
        {
            try {
                FontFamily fm1 = FontFamily.forName("MyFont");
                Font f1 = fm1.getFont(Font.PLAIN, 25);
                helloWorld.setFont(f1);
            } catch (ClassNotFoundException e) {
                System.out.println(e.getMessage());
            }
        }

 

But i think its not working in os 5..am i using the correct code?

Developer
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer

Re: Using custom fonts

Yah absolutely correct. It is depend on OS and also device i already check one custom font. it is working fine id 9780 bold with OS6 but it is not working in OS6 tourch 9800. reasion i dont know but i fell it may not support 

New Developer
Posts: 39
Registered: ‎02-21-2012
My Device: Blackberry 9300
My Carrier: Developer

Re: Using custom fonts

Thanks for your reply.....

New Developer
Posts: 39
Registered: ‎02-21-2012
My Device: Blackberry 9300
My Carrier: Developer

Re: Using custom fonts

I check it in 9300 with os 6..but i didnt feel any change in font.

Developer
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer

Re: Using custom fonts

try with 9780bold one let me know..

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Using custom fonts

How big is your Font file?

 

You might like to put the font on an SD Card, and then try this utility:

http://supportforums.blackberry.com/t5/Java-Development/Font-Loader-Manager-Utility/m-p/592647#M1223...

New Developer
Posts: 39
Registered: ‎02-21-2012
My Device: Blackberry 9300
My Carrier: Developer

Re: Using custom fonts

Font file is 42 kb in size .i think its below the limit