• 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 - HTML5 Custom Font display issues

S

SVG

Guest
HTML5 seems to have a bug with custom font even after testing. Here you go:

Code:
global.font = font_add_sprite_ext(spr_font, "my letters", true, 0);
HTML5 Export messes up pixels and does some funky things on a lot of my custom letters
WIN Export however works out just fine. The problem seems to be connected to the last argument of the font_add_sprite_ext...

custom_font_issues.PNG

The problem seems to be connected to the last argument of the font_add_sprite_ext that deals with "sep" or separation of pixel spacing between each letter.

-If you make it a 0 it causes this bug only for HTML5.
-If you make it a 1 or higher then the issue disappears; however, it does create another problem by "looking bad" due to the spacing between letters.

I'll continue testing other things but maybe someone might already know, hence this post. Any help would be appreciated, thank you!
 
S

SVG

Guest
It messes up with doing fa_center for the draw position, it seems to sometimes not give an exact whole number possibly and in HTML5 it adjusts pixels to make up for it's position. All issues go away when drawing to the fa_left position.
 

Ricardo

Member
It messes up with doing fa_center for the draw position, it seems to sometimes not give an exact whole number possibly and in HTML5 it adjusts pixels to make up for it's position. All issues go away when drawing to the fa_left position.
If this behavior in HTML5 is inconsistent with native (says Windows), make sure to fill a bug.
 
Top