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
Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Font in device

I have an app (specifically in 9100) that runs great in simulator but when I deployed on the phone, the menu looks "moved" and the listfied height is truncated. It looks like the device is not taken the font change i did. My code is :

 

try {

   FontFamily alphaSerifFamily = FontFamily.forName("BBAlpha Sans"); // Serif

   appFont = alphaSerifFamily.getFont(Font.PLAIN, 5, Ui.UNITS_pt);

} catch (ClassNotFoundException e) {

 BBUtils.errorDialog(e.getMessage());

}

 

No message is shown so the font chage is riunning fine...

is this possible something looks fine on simulator but no on device ?

Highlighted
Developer
Posts: 112
Registered: ‎09-23-2009
My Device: Not Specified

Re: Font in device

Are you sure you've tested it with 9100 simulator? I think the problem is because of the uniqueness of 9100 that has resoultion 360x400 px. I assumed that you tested it with low resolution simulator, so it would looks great with normal sized fonts. But for 9100, 5 is a relatively really small font.

Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: Font in device

Thanks. In the simulator, it runs fine but in the device, it looks like there is no font change and the chars are too wide for the layout I made...

Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: Font in device

Enclosed pictures:

bb<ImageName> Image from BlackBerry device

s<ImageName> image from simulator

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

Re: Font in device

Have you tried setting this font and size on the device and see if your app then runs correctly?

Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: Font in device

Yes, I did check the used font in the device and it is present...

Thanks

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

Re: Font in device

Sorry not my question.  Have you specifically set this as the default on the device, and then tried your application. 

Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: Font in device

Sorry, I did not understand your question...

Well, I check the device and the font used for  the app is the default font in this device...