Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / HTML5 Export and TrueType Fonts?

Author
Message
SteelPrincess
7
Years of Service
User Offline
Joined: 21st Jan 2017
Location:
Posted: 21st Jan 2017 11:17
Heyhey,

Has there, or will there be any coming resolution for the issue of TrueType fonts not working with HTML5 exports?
Or, has anyone figured out why some TTFs work and others do not with the HTML5 export?

I would really like to be able to use these fonts with my upcoming games, however... it seems they are incredibly unreliable and cause more browser crashes than not crashes.

Is there a work-around for it?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 23rd Jan 2017 09:33
TTFs work in my HTML5 applications.

I made a simple code template for Breakout/Arkanoid and it uses TTF text. Check out the game and see for yourself. It uses a font not installed on peoples machines and works just fine. (Even on Android)
http://www.teamdefiant.co.uk/software/arkaniod
SteelPrincess
7
Years of Service
User Offline
Joined: 21st Jan 2017
Location:
Posted: 23rd Jan 2017 10:27
Yeah, it works sometimes, on some browsers. It may work on your browser, and the browser of some people, but not on others. I had several people crash trying out a game I was writing. I had to convert the TTF I wanted to use to a bitmap font, because trying to display the TTF itself crashed half the people who loaded it. It took me awhile to figure out it was the font doing it, as I had to comment out swaths of code, until only the true type font code was the only thing left. Once I replaced the font with bitmap fonts, everything was peachy keen and worked perfectly.

Neateo game, btw.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 23rd Jan 2017 10:46
Did you try another TTF? It's possible either the font itself was corrupt somehow, or you were looking in the wrong place for it. (I read somewhere that there was an issue where you had to load the font in as a memblock, write it back out, then load it again for it to work. I believed that this issue was resolved however)
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Jan 2017 17:14
I had the same issue with TTF on HTML5 export. Reported and confirmed by Paul before Christmas (here). He said he'd pick this up again in Jan so hopefully he's working on the problem now.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
SteelPrincess
7
Years of Service
User Offline
Joined: 21st Jan 2017
Location:
Posted: 23rd Jan 2017 18:37
Thanks, CJB, glad to know I'm not crazy, lol.

It's not a deal breaker, since I just make stuff for fun and I'm just learning, and I can just use Bitmap fonts in the meantime; there's not much difference between the two aside from a few KB in size.

Thanks!
CatfoodMcFly
9
Years of Service
User Offline
Joined: 24th Jan 2015
Location: Stoke-on-Trent
Posted: 28th Jan 2017 17:36
I'll just add to this thread that I was having some trouble with my html5 project reporting that a font couldn't be found. The problem was that the font name wasn't case sensitive on my local machine, but it was once uploaded. As soon as I switched the .ttf file's name to all lowercase same as in the code, the problem was solved.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Jan 2017 16:36
It appears HTML5 has issues with some TTF fonts, I don't know why, but it seems to be something to do with the way the Freetype library we are using is compiled into Javascript. I don't if I will be able to fix this.
SteelPrincess
7
Years of Service
User Offline
Joined: 21st Jan 2017
Location:
Posted: 31st Jan 2017 10:13
Thanks for looking into it, Paul.

Can we get Facebook() commands to work in HTML5 in lieu of fixing TTFs? *wink* *wink* *nudge* *nudge*

Login to post a reply

Server time is: 2024-11-24 20:37:57
Your offset time is: 2024-11-24 20:37:57