deathshadow
Nov 3rd 2007, 11:51 am
I've been playing with this idea on and off for a month - this is where I'm at:
http://battletech.hopto.org/experimental/dynafont/template.html
Under the hood this works much like a font engine I wrote for a DOS program for the VGA card's 'Mode X' ages ago... Basically I have a array that contains some basic kerning info, use javascript to replace the contents of a section with one span for each character, then slide a single .png (http://battletech.hopto.org/experimental/dynafont/images/fontP.png) around to show each character. The kerning for the current character is added to the next character, which I then set the margin-right negative equal to the amount of overlap there should be.
It works in IE, Opera and Safari, and while it works in FF on my desktop, I've had a few people report that the div's aren't rendering completely or at all on other machines. (firefux not working right? - I'm shocked... wait, no I'm not)
If I could get some confirmation on it not working in FF with screencaps of it screwing up, that would be very helpful. (the two reports I have of it not working in FF both people ended up with corrupted screencaps that the whole computer - even their desktop was messed up - video driver error? - http://img248.imageshack.us/img248/4211/hurmzm6.png)
Keep in mind this is WIP and the code has a LOT of 'clean up' needed - and I need to make it handle actually recieving HTML and such. I'm wondering if I can implement bold, italic, underline and strikethrough - the first two by making more images, the latter two by applying another span inside the letter ones.
So... am I crazy to even be trying this, or does it look like something worth pursuing? True 'web fonts' are either a decade away or a decade behind us when it comes to being 'real world deployable' - and this COULD (with some more tweaking) fill that gap...
Certainly better than that crap flash based method when it comes to accessability since it works from actual text on the page.
http://battletech.hopto.org/experimental/dynafont/template.html
Under the hood this works much like a font engine I wrote for a DOS program for the VGA card's 'Mode X' ages ago... Basically I have a array that contains some basic kerning info, use javascript to replace the contents of a section with one span for each character, then slide a single .png (http://battletech.hopto.org/experimental/dynafont/images/fontP.png) around to show each character. The kerning for the current character is added to the next character, which I then set the margin-right negative equal to the amount of overlap there should be.
It works in IE, Opera and Safari, and while it works in FF on my desktop, I've had a few people report that the div's aren't rendering completely or at all on other machines. (firefux not working right? - I'm shocked... wait, no I'm not)
If I could get some confirmation on it not working in FF with screencaps of it screwing up, that would be very helpful. (the two reports I have of it not working in FF both people ended up with corrupted screencaps that the whole computer - even their desktop was messed up - video driver error? - http://img248.imageshack.us/img248/4211/hurmzm6.png)
Keep in mind this is WIP and the code has a LOT of 'clean up' needed - and I need to make it handle actually recieving HTML and such. I'm wondering if I can implement bold, italic, underline and strikethrough - the first two by making more images, the latter two by applying another span inside the letter ones.
So... am I crazy to even be trying this, or does it look like something worth pursuing? True 'web fonts' are either a decade away or a decade behind us when it comes to being 'real world deployable' - and this COULD (with some more tweaking) fill that gap...
Certainly better than that crap flash based method when it comes to accessability since it works from actual text on the page.