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
fenixlam
Posts: 61
Registered: ‎06-01-2009
My Device: Not Specified
Accepted Solution

How to set the font family "ARIAL" in the RichTextField?

How to set the font family "ARIAL" in the RichTextField?

I have seen a lof of sample that show up how to set font family in the RichTextField, such as set it as CBTF_FONT.

But how can I set it as Arial font? If it cannot be, could anyone list an available font family table that can use in the Blackberry?

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to set the font family "ARIAL" in the RichTextField?

With OS 5.0 it is possible to package and install a font on the BlackBerry.  Prior to OS 5.0, you were restricted to the fonts installed by RIM on your Blackberry. 

 

So if you are trying to get Arial on a pre OS 5.0 device, you can not.  To get it on an  OS 5.0 device (or later) you will need to package the font up in your application and install it.  There are samples in the OS 5.0 documentation showing you how to do this.  However you are limited in the size on font you can install, and I think, from my font directory, that Arial is too big.  The limit is, from memory, 90 K.  Beside, I'm not sure that Arial is not owned by Microsoft, so adding it to a BlackBerry might be not legal for copyright reasons. 

 

So create yourself a smaller Arial like font and you should be able to install and use this on the BlackBerry. 

Please use plain text.
Developer
fenixlam
Posts: 61
Registered: ‎06-01-2009
My Device: Not Specified

Re: How to set the font family "ARIAL" in the RichTextField?

:smileysad: Unlucky that my target is an OS 4.6, and "that cannot be upgraded" is a condition (T_T).

 

That means I have no way to use any customize font family, is that right? 

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to set the font family "ARIAL" in the RichTextField?

You are correct, for those devices you can only use the fonts already on the device. 

Please use plain text.