[SOLVED] Use custom font in android Cocoonjs app.

Get help using Construct 2

Post » Fri Jul 19, 2013 10:39 pm

Hi to all you special guys,
I have imported in my project the files for a web font,
I have also used a dummy text to prevent print issue on screen and all is ok previewing in the browser but when I export and try my project in cocoonjs the only thing I will reach to display is a miserable arial font.
How can I do?

Thx in advance...parside2013-07-20 13:26:22
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Sat Jul 20, 2013 8:49 am

[SOLVED]

I tryed to use normal font (set font face) instead of webfont.
Initially, nothing to do.
Then, finally I have found and solved my issues.

How use custom fonts in your androdid apps and export them in CocoonJS:

1) create your .ttf font; I download one from Squirrel Font named pusab___-webfont.ttf

2) open the font and look at its real name: In my case Pusab (<--- look at the P)

3) rename the file into pusab.ttf (<---- p not P)

4) INSTALL IT TO YOUR SYSTEM: i opened it and there is the opion
-> install <-

5) Open you project in Construc 2

6) import in your files folder the file pusab.ttf

7) now normally choose in your Text objects the font pusab

8) export your project with cocoonJS

9) load it in preview and clicking on fps you will notice: "Custom font loaded: game/pusab.ttf

10) SOLVED.

I hope to be useful with this one...

Bye, Parside.parside2013-07-20 08:59:26
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Sat May 24, 2014 2:44 am

@parside Thank you! just got it working with my game on a cocoonjs build and my custom font. was using webview before and it was a no go. Thanks for the walk through!
B
9
S
3
G
1
Posts: 14
Reputation: 1,313

Post » Thu Jul 10, 2014 6:58 am

You are welcome :D
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Tue Apr 21, 2015 12:58 pm

is there a way to test it on run layout(not the export)? Because with my font, the procedure didn´t work. Also, my font is called AR DELANEY
B
5
S
1
Posts: 27
Reputation: 425


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests