Simon ([personal profile] swaldman) wrote in [community profile] style_system2012-12-22 05:55 pm

(no subject)

I squeeeed quite a lot when I heard that webfont support was now available in the wizard.
However, I can't figure out how to use it. I think that I'm doing something wrong with DW, but it may be that I'm doing something wrong more generally - I'm new to this.

So I've used FontSquirrel's excellent converter to produce versions of the font in all the various formats, and I've hosted them all at http://www.firecloud.org.uk/07509_centaur-webfont.extension.

I've created a file at http://www.firecloud.org.uk/centaur.css, which contains:
@font-face {
    font-family: 'Centaur';
    src: url('http://www.firecloud.org.uk/07509_centaur-webfont.eot');
    src: url('http://www.firecloud.org.uk/07509_centaur-webfont.eot?#iefix') format('embedded-opentype'),
         url('http://www.firecloud.org.uk/07509_centaur-webfont.woff') format('woff'),
         url('http://www.firecloud.org.uk/07509_centaur-webfont.ttf') format('truetype'),
         url('http://www.firecloud.org.uk/07509_centaur-webfont.svg#centaurregular') format('svg');
    font-weight: normal;
    font-style: normal;

}
In the Dreamwidth Customize wizard, I have put the font to use as "Centaur,Times New Roman,serif" in a number of fields, and I have put "http://www.firecloud.org.uk/centaur.css" as the "Embedded fonts stylesheet URL ".

And yet, I'm still seeing this text display in Times New Roman.

Help! What am I missing?

Thanks :-)
 

exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2012-12-22 07:16 pm (UTC)(link)
It looks like the cssproxy was failing to resolve "www.firecloud.org.uk" -- me poking at things seems to have gotten it to wake up.

I'm seeing your title in, well, a different font now.
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)

I give up trying to make the HTML cleaner not hate me.

[personal profile] momijizukamori 2012-12-22 08:15 pm (UTC)(link)
I think the problem you may be running into is that Gecko is trying to save you from yourself *g* I'm seeing the new font fine in Chrome, but not in FF, which means you probably haven't reconfigured your .htaccess to allow cross-domain requests on the font (which Gecko refuses to do by default, unlike the other browsers). You'll want this block in there:

[Error: Irreparable invalid markup ('<filesmatch "\.(ttf|otf|woff|eot)$">') in entry. Owner must fix manually. Raw contents below.]

I think the problem you may be running into is that Gecko is trying to save you from yourself *g* I'm seeing the new font fine in Chrome, but not in FF, which means you probably haven't reconfigured your .htaccess to allow cross-domain requests on the font (which Gecko refuses to do by default, unlike the other browsers). You'll want this block in there:

<FilesMatch "\.(ttf|otf|woff|eot)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
Edited 2012-12-22 20:17 (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)

Re: I give up trying to make the HTML cleaner not hate me.

[personal profile] momijizukamori 2012-12-23 02:21 pm (UTC)(link)
It happens XD and aha, Gecko strikes again.
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2012-12-23 08:40 pm (UTC)(link)
Yeah, DW's cssproxy caches the cleaned content for 5 minutes ( unless you have a no-caching specified in the http headers, so next time you want to mess with things, set that first and wait for it to expire! ).