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)
My Carrier: Singtel
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.

 

 

Please use plain text.
Contributor
harshalbid271
Posts: 42
Registered: ‎02-17-2012
My Device: Newb Playbook Developer
My Carrier: -

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.

Please use plain text.
Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)
My Carrier: Singtel

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

Thanks. I will give a try.

Please use plain text.
Contributor
chiguire
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer

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

Please use plain text.
Contributor
ImperialPenguin
Posts: 20
Registered: ‎07-15-2012
My Device: Developer
My Carrier: Sprint

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.
Please use plain text.
Contributor
ImperialPenguin
Posts: 20
Registered: ‎07-15-2012
My Device: Developer
My Carrier: Sprint

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.
Please use plain text.
Contributor
chiguire
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer

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.

Please use plain text.