Hi Már,
No, unfortunately not. Cufón relies on computed CSS values, which
different browsers return differently. For example, the computed value
of font-family in the following CSS rule:
h1 {
font-family: "My Special Font", Arial, sans-serif;
}
returns:
"My Special Font" in WebKit-based browsers (including Safari, Chrome)
"My Special Font",Arial,sans-serif in Gecko-based browsers
"My Special Font", Arial, sans-serif in Internet Explorer
but..
Arial in Opera. Even Opera's currentStyle returns Arial.
So, the only choice would be to manually parse all style sheets, which
is something I'd rather not do because it can get insanely complicated
(and therefore slow). For example..
h1 {
font-family: "My Special Font", sans-serif;
}
#home h1 {
font-family: Arial;
}
Not only would you have to parse the style sheet, you'd have to build
a CSS engine. Don't even mention !important, @media rules etc.
Detecting whether @font-family was used and whether it is even
supported (and if it is, does it support the font format) isn't easy
either.
Simo