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

Native Development

Reply
New Contributor
Posts: 9
Registered: ‎02-14-2013
My Device: Playbook

Cocos2dx and ttf fonts

Hello,

 

I'm using cocos2dx to develop for Playbook/BB10. My game is localized for many languages. The problem is that CCLabelTTF is unable to properly display non-english characters. Does anybody know any workaround?

 

Retired
Posts: 29
Registered: ‎03-19-2012
My Device: Z10

Re: Cocos2dx and ttf fonts

Could you please post the version of cocos2Dx you are using?

 

Another work around could be to use libfreetype that comes packaged with the BlackBerry 10 SDK.

 

Cheers, Ram

 

 

New Contributor
Posts: 9
Registered: ‎02-14-2013
My Device: Playbook

Re: Cocos2dx and ttf fonts

[ Edited ]

I was using cocos2d-2.1rc0-x-2.1.2. As a workaround, I removed all localizations from my game, so only English is supported now.

Retired
Posts: 29
Registered: ‎03-19-2012
My Device: Z10

Re: Cocos2dx and ttf fonts

Hi,

 

Could you tell me which non-English fonts you were trying to use? (european, asian etc?)

 

Thanks, Ram

New Contributor
Posts: 9
Registered: ‎02-14-2013
My Device: Playbook

Re: Cocos2dx and ttf fonts

I tried to use european languages (French, Spanish, German).

Retired
Posts: 29
Registered: ‎03-19-2012
My Device: Z10

Re: Cocos2dx and ttf fonts

It is strange because the cocos2dx uses freetype underneath and the freetype supports european language.

 

What kinds of display issue you were seeing?

 

thanks, Ram

New Contributor
Posts: 9
Registered: ‎02-14-2013
My Device: Playbook

Re: Cocos2dx and ttf fonts

As I remember, some chars were displayed incorrectly or were truncated. Font stuff is implemented in CCImage, yes it uses freetype library, but that code seems to be buggy. 

 

Are you able to correctly display French strings such as:

 

La fonction d'achats intégrés est désactivée sur votre appareil. Vérifiez vos paramètres système.