Webfonts not working with Node-Webkit

Get help using Construct 2

Post » Wed Feb 27, 2013 10:05 am

Having some issues with loading webfonts via node-webkit, in an exported .exe file.

Works absolutely fine in the browser though. Another oddity, it displays a comic sans font in the exe...

Nowhere in the project have I picked a comic sans font for the text object, it's always set to arial by default. Anyone else have this issue? Or know how to fix it?

Thanks guys...
B
13
S
6
G
5
Posts: 74
Reputation: 3,991

Post » Thu Feb 28, 2013 1:42 am

Yikes, comic sans is the last font you would ever want to use :)

I actually was trying fonts with node-webkit for the first time today to see if I could work it out, and it it worked perfectly. Was cool to see the font displayed in the layout in C2 as well. After following this tute it worked without a hitch:

https://www.scirra.com/tutorials/237/how-to-use-your-own-web-fonts?page=2

Maybe it is the font that you used? Some fonts may be more problematic than others? I just changed my .ttf to a .woff via Font Squirrel using the visitor1 font from Dafont.com:

http://www.dafont.com/search.php?q=visitor

you could always try this font as test and then go back to your original font.
B
11
S
2
G
1
Posts: 108
Reputation: 1,899

Post » Thu Feb 28, 2013 2:43 am

Replacing all your fonts with comic sans is a royal insult. What did you do to your computer to make it hate you so

Seriously though, could it be related to this issue?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Feb 28, 2013 11:40 am

Thanks guys.

I managed to fix the issue. I was loading the font in each layout instead of right at the start of the game. Not really sure why that would cause problems but for whatever reason it did.

Everything seems okey dokey now. Thanks for the help though.

And yeah, my computer and I are going to have to have a little "chat" soon. I think one possibility why it chose comic sans is because I was using a "comic" book kind of webfont. Maybe that was it.
B
13
S
6
G
5
Posts: 74
Reputation: 3,991


Return to How do I....?

Who is online

Users browsing this forum: WhosWho, Yahoo [Bot] and 23 guests