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

Native Development

Posts: 30
Registered: ‎03-03-2012
My Device: Playbook
My Carrier: Blackberry

UTF Font rendering.

Hi all,


We need to display the users name in the leaderboards. The name could contain any UTF character (so, English, Japanese, German etc). The standard bbutil_* utility routines on do the first 128 characters, so this isn't going to work. So how is everyone else displaying names etc? There's 3415 glyphs in the Arial font, thats 13 megs of textures to support the whole lot.


Any insights?



Steven Haggerty,
Rubicon Development ( http://www.rubicondev.com/ )
Trusted Contributor
Posts: 152
Registered: ‎02-23-2011
My Device: dev alpha playbook 9500 8300
My Carrier: uc

Re: UTF Font rendering.

Load the char font only when needed;

it should work by   "font load BUFFER"  for such UTF code ,


such as:
1 define a STL MAP ,map<charcode, font *>
2 count the  new chars  need to display,if it is not in the MAP, in this page
3 load the new chars in one time , then put in MAP.
4 render page  by the font handle in the MAP

5,and go on next page.


something  improve:
6  free the unnecessory chars in the MAP  when the MAP grows big, as you wants,