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
Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)
Accepted Solution

customerized fonts on Cocos2d-x on BB10 other than Arial

Hi,

Has anyone got the solution to use external fonts other than the default Arial font on BB10 through Cocos2d-x 2.0.x? Thanks.

 

 

Contributor
harshalbid271
Posts: 42
Registered: ‎02-17-2012
My Device: Newb Playbook Developer

Re: customerized fonts on Cocos2d-x on BB10 other than Arial

Hi! I tried and tried and tried but i couldnt get the ttf fonts to work. But you can use CCLabelBMFont, as it works just fine.

Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)

Re: customerized fonts on Cocos2d-x on BB10 other than Arial

Thanks. I will give a try.

Contributor
chiguire
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook

Re: customerized fonts on Cocos2d-x on BB10 other than Arial

There is an open issue right now in cocos2d-x, but it has been pushed back a couple of times. There is a way to use the grskia library to create a typeface with a filename instead of the bundled fonts, but it requires a brave coder that can implement that :-)

 

Here's the issue to follow up - http://www.cocos2d-x.org/issues/1024

Contributor
ImperialPenguin
Posts: 20
Registered: ‎07-15-2012
My Device: Developer

Re: customerized fonts on Cocos2d-x on BB10 other than Arial

I'm one of the people pushing that back, and I"m really sorry for taking so long. Things just got incredibly busy and I haven't had much time. I don't really want to give a time estimate again and then fail to deliver.
Although if my code was added to 2.0, then TTF fonts should work. They get cut off, and anti-aliasing is bad, but they display. Do they work on Playbook?
My code was for the 1.x branch of Cocos2d-x, so it's possible it didn't make it into 2.0.
Contributor
ImperialPenguin
Posts: 20
Registered: ‎07-15-2012
My Device: Developer

Re: customerized fonts on Cocos2d-x on BB10 other than Arial

My code was accepted into the gles20 branch, so building the latest version should allow you to use custom fonts.
Apparently there are still some minor rendering issues. I'll try to take a look at those when I get a chance.
Contributor
chiguire
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook

Re: customerized fonts on Cocos2d-x on BB10 other than Arial

Thanks for taking the time :Clap: :heart: I'm usually sticking to use the latest release version, so it could be some time before I start using that branch.