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: 11
Registered: ‎06-22-2009
My Device: Not Specified

how to change the system Font?

I mean I hope the changes can apply for all the applicaiton, not only for my running application?

I tried this way:

  

  FontFamily fm= FontFamily.forName("BBAlpha Sans");

  Font font = fm.getFont(Font.PLAIN, 7);

  Font.setDefaultFont(font); 

 

but it seems only change my application font.

 

 

 

 

Any idea?

 

Thanks 

Developer
Posts: 395
Registered: ‎12-18-2008
My Device: BlackBerry Torch 9800
My Carrier: AT&T

Re: how to change the system Font?

I believe the system font is selected in the Theme but then customizable by the user. I don't remember seeing an API that allows a program to change it. That would be a huge problem if there were.
New Developer
Posts: 11
Registered: ‎06-22-2009
My Device: Not Specified

Re: how to change the system Font?

Thanks your reply. If so, I guess what I can do is use  inject navigation event to do same thing with user manually do.
Developer
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: how to change the system Font?

Go through this thread. You might get some better idea.

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=28942&view=by_date...

 

Regards

Bikas

Highlighted
New Developer
Posts: 11
Registered: ‎06-22-2009
My Device: Not Specified

Re: how to change the system Font?

I use it (setDefaultFontForSystem) today, it seems it works on simulator, but while in device, it says:ControlledAccessException.

then I tried add "PERMISSION_CHANGE_DEVICE_SETTINGS" to my application, but the exception still appears.

Any suggestion?