On Nov 17, 2012, at 6:08 PM, Dmitriy Sintsov <questpc(a)rambler.ru> wrote:
Right. I can probably make local stylesheet with
references to google cdn, however I am not sure it wil not violate IE security or
something.
So I did:
$out->addLink( array( "rel" => "stylesheet",
"href" =>
"http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin,cyrillic,latin-ext"
) );
$out->addLink( array( "rel" => "stylesheet",
"href" =>
"http://fonts.googleapis.com/css?family=Open+Sans:400,600&subset=latin,cyrillic,latin-e
xt,cyrillic-ext,greek,greek-ext" ) );
No IE security issues, unless your website is served from HTTPS in which Chrome, IE and
possibly other browsers will block those requests (which is good).
The Google Font APIs support HTTPS natively:
*
http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin,cyri…
*
https://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin,cyr…
So in that case I'd recommend load with with a protocol-relative url so that it always
works (only do this for urls that you know support both, such as Google Font APIs).
"href" =>
"//fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin,cyrillic,latin-ext"
More about protocol-relative:
http://paulirish.com/2010/the-protocol-relative-url/
-- Krinkle