• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 [SOLVED] Black Box instead of dialogue

So, I have a custom font installed and not everyone can see it on HTML5. For some people, it looks like a black box instead of text.

I am not having this issue myself and can't replicate it because I have no other PC. (I could uninstall the font, I just thought of this now.)

Does anyone have any clue how I can support custom fonts for HTML5? Do I need to include the font into the include folder or something?

Changing the font to Arial seems to fix it for people, but I would rather use my own font.

Edit: I just found the font documentation. Reading it now.

Edit 2: Yeah, I still don't know.

Thank you.
 
Last edited:

Nocturne

Friendly Tyrant
Forum Staff
Admin
Well, first, I'd file a bug report and include a link to the project... the fact that it works for some people and not for others is a strange issue, as the font should be rendered to a texture page and should be visible to everyone without having to include the actual font file in the project (which could be a licencing issue, depending on the font being used, so I wouldn't recommend it). Do you know what browsers the people that can't see the font have? Have you installed various browsers on your PC to see if you can reproduce it in any of them (Edge, Firfaox, Opera, etc...)? One fairly easy fix would be to make the font a sprite using some image editor (so each glyph is a separate image index) and then use font_add_sprite() or font_add_sprite_ext() to add it into your game. This should work across all devices/browsers.
 
Well, first, I'd file a bug report and include a link to the project... the fact that it works for some people and not for others is a strange issue, as the font should be rendered to a texture page and should be visible to everyone without having to include the actual font file in the project (which could be a licencing issue, depending on the font being used, so I wouldn't recommend it). Do you know what browsers the people that can't see the font have? Have you installed various browsers on your PC to see if you can reproduce it in any of them (Edge, Firfaox, Opera, etc...)? One fairly easy fix would be to make the font a sprite using some image editor (so each glyph is a separate image index) and then use font_add_sprite() or font_add_sprite_ext() to add it into your game. This should work across all devices/browsers.

This is what someone said about it:

"all the text in the game are just black boxes, so i cant read anything"

"Edit: even on another browser it doesent work" - (He tried a different browser and still didn't work)

"its good now" - (after changing it back to Arial)


A few people have said this but others acted like it didn't happen to them, that it was all good.


I actually haven't tested it on other browsers. I didn't even think to do that.. lol. I will try this.


I will probably resort to the font_add_sprite if I can't get it to work.


Thanks for replying and helping me out, I seriously appreciate it. :)
 
Last edited:
Top