[OpenFontLibrary] font face firefox friendly?

Aaron Spaulding professionalaaron at gmail.com
Wed Jan 7 13:37:16 PST 2009


On Wed, 2009-01-07 at 07:31 -0500, Ed Trager wrote:
> If someone on this list has any ideas on how to check for @font-face
> support using Javascript, please let all of us know about it.

Well the definition for the 'em' unit is the size of of the capital
letter M in the current font.  So, it would be possible to create a font
with a letter 'M' that has an absurdly large height.  Then you link the
font to the page, and create a div with a height of 1em.  The pixel size
of the div should match the the height of the absurdly large
'M' (provided you use the right font height).

Not a perfect solution, but its better than nothing.
-- 
Aaron

http://sachimp.com
http://getcorkd.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/openfontlibrary/attachments/20090107/e2225153/attachment.pgp 


More information about the OpenFontLibrary mailing list