It's been an interesting week development-wise, because I had to set 512 aside for a bit to give the webclient some much-needed love. A couple of important bugs were discovered that needed attention, and I'm still looking into a few issues to figure out what's not working right in a specific game. There will be a new release fairly soon, but not today because not only am I still looking for issues, but you all know how I feel about Friday releases.
One of the things I spent a lot of time on this week was getting font support where it needs to be in the webclient. Downloadable fonts have been in BYOND for ages now, but the webclient didn't really do anything with them. Now it does, sending along .ttf, .otf, .woff, and .woff2 fonts that are in your .rsc file. I strongly advise that all developers who use fonts create a .woff or .woff2 conversion and include that in their resources, because some browsers have problems with certain fonts. The project I was working on used a .ttf font that Chrome apparently hates (didn't try Firefox but I assume it's the same deal). I've added the opentype.js library to the next release, so that the webclient can analyze downloaded fonts and get the font name so it can create @font-face declarations in CSS. For instance, in a test project I got this to happen:
@font-face { font-family: 'Gang Wolfik'; src: url(...) format(truetype), url(...) format(woff) }
Then of course I had to make sure that maptext worked right. If maptext is generated before the font is fully loaded, it needs to be updated. So I had to add code to monitor the fonts, and then figure out why the maptext update wasn't working correctly. But now it works!
Don't forget to hit up the donation box or become a Member if you haven't yet. Summer is the very best time for BYOND gaming! I speak from experience. So get your game on, and a big thanks to everyone who supports BYOND.
http://www.byond.com/forum/?post=705799