Fonts, fonts, fonts
I recently heard about Sifr, which allows for a flash movie (embedded with a font) to serve non web fonts on a page.
I realized their trick of using javascript to rewrite the page allowed for proper SEO and a good fallback.
I've written some javascript to do this. Basically this will allow the page to just contain proper html (in this case with some spans with their class set to "segoeui". Google will read the page just as text and if they don't have javascript enabled the text will display in whatever style segoeui is set to.
If javascript is enabled the code will look through all of the elements on the page, replace the ones with class set to "segoeui" with the correct image and parameters (and we can pass the width/height of the element here, so we could set the font size to whatever will "fit" within the space, allowing the size of this image font to be controlled by the css for "segoeui").
JScript.js
(The getElementsByClass was written by Dustin Diaz)
Want to see an example? Click here and then look at the source.
I realized their trick of using javascript to rewrite the page allowed for proper SEO and a good fallback.
I've written some javascript to do this. Basically this will allow the page to just contain proper html (in this case with some spans with their class set to "segoeui". Google will read the page just as text and if they don't have javascript enabled the text will display in whatever style segoeui is set to.
If javascript is enabled the code will look through all of the elements on the page, replace the ones with class set to "segoeui" with the correct image and parameters (and we can pass the width/height of the element here, so we could set the font size to whatever will "fit" within the space, allowing the size of this image font to be controlled by the css for "segoeui").
JScript.js
(The getElementsByClass was written by Dustin Diaz)
Want to see an example? Click here and then look at the source.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home