Custom fonts in HTML5 don't work.

I’m trying to use some custom fonts in HTML5 but doesn’t seems to be working. It is works in native game but not in HTML5.
I have also added the font to the image library to try to force it to be preloaded but nothing helps.
Tried in Firefox and Edge, using Pixi.js and also the export with Cocos2D.js, also hard refresh million times.
In v4.0.94 and also in the previous 4.0.92 and the latest nightly.

I’m not sure if it a problem with the font I’m using or it is bug, I just leave it here and in case anyone able to confirm it if it a bug or a problem with the fonts I’m trying to use would be great.

Thanks.

Can we have the fonts to test them?

Here we go:
fonts.zip (9.38 KB)

Thanks.

It works on my computer. Pixi.js however returns some warnings in the console as some parts of the font are badly configured but it works anyway.

It doesn’t works here :confused:

This is the error messages I get:

downloadable font: bad search range downloadable font: bad range shift downloadable font: cmap: bad id_range_offset downloadable font: hdmx: the table should not be present when bit 2 and 4 of the head->flags are not set downloadable font: hdmx: Table discarded

I get the same thing but it works.

I’m trying to change the fonts using events, if I change the font in the text property, it works but the event to change font of the text object doesn’t work in HTML5.

The action to change font is not available in HTML5 games (you’re probably editing the events with the C++ platform, so you can see it in the list).

I see Thanks :smiling_imp:

In the next version, a message will warn the user when an action or a condition he/she wants to add (from the action/condition insertion dialog) is not available on all platforms his/her project is using.

Yes, that would be useful. Normally I always have both platforms enabled so I can quickly preview on whichever platform I want but I was not aware of that even events can be different. I thought the behaviours available for both platform has the same features and events on both…