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
sheepk
Posts: 30
Registered: ‎06-01-2009
My Device: 9000 Bold

Font problem using an ActiveRichTextField

Hi all,

 

I'm using an ActiveRichTextField to display some datas about a person, such a phone number, so the BB menu can suggest me to call that number, or to send a sms...

 

The problem is : the phone number is highlighted but displayed with a bigger font size! The only way I found to display it correctly is by setting the defaultFont (Font.setDefaultFont). But I don't want to use this, because the BB menu is messed up (on 4.6 and some 4.6.1).

 

Using setFont on the screen level does not resolve the issue.

 

Do you have a solution or have you already encountered that issue?

 

Thanks 

Please use plain text.
Developer
sheepk
Posts: 30
Registered: ‎06-01-2009
My Device: 9000 Bold

Re: Font problem using an ActiveRichTextField

[ Edited ]

Additional details about this issue :

 

The problem only appears when the text is short (it seems to be like that...) :

 

For instance : putting "Telephone :  xxxxxxxxxx" in the ARTF displays :  Telephone :  XXXXXXXXXX (big size)

 

But writing : "Telephone : xxxxxxxxxx\nPlease call on monday or tuesday" works great, it displays :

 

Telephone : xxxxxxxxxx

Please call on monday or tuesday

Message Edited by sheepk on 10-07-2009 02:59 PM
Please use plain text.
New Developer
mdwheaton
Posts: 37
Registered: ‎07-15-2008
My Device: Not Specified

Re: Font problem using an ActiveRichTextField

I've had the same issue, and worse still, I was using getAdvance() calculations on the font which were returning incorrect values.

The solution I have it append a space to the end of all values that display in my ActiveRichTextFields

Please use plain text.
Developer
sheepk
Posts: 30
Registered: ‎06-01-2009
My Device: 9000 Bold

Re: Font problem using an ActiveRichTextField

OK,

 

Thanks for you answer. 

Please use plain text.
Developer
ronenfe
Posts: 77
Registered: ‎06-03-2009
My Device: Not Specified

Re: Font problem using an ActiveRichTextField

[ Edited ]

i have the same problem with urls, they remain in the default size after i set the font size of the field to a lower value.

 

edit:

 

thanks, putting spaces at the end of the field solves the problem.

after investigating it the legnth of the stirng should be at least 33 characters.

Please use plain text.