سؤال

i used below code for font support using from ,

<link href='http://fonts.googleapis.com/css?family=Open+Sans|Oswald|Play|Numans' rel='stylesheet' type='text/css'>

if i use the above URL, the fonts supported in all the browser.

    @font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: normal;
  src: local('Oswald '), local('Oswald'), url('http://themes.googleusercontent.com/static/fonts/oswald/v2/-g5pDUSRgvxvOl5u-a_WHw.woff') format('woff');
}
@font-face {
  font-family: 'Numans';
  font-style: normal;
  font-weight: 400;
  src: local('Numans'), local('Numans-Regular'), url('http://themes.googleusercontent.com/static/fonts/numans/v2/H6jkjoZl4TIrPYyjhdoCcw.woff') format('woff');
}
@font-face {
  font-family: 'Play';
  font-style: normal;
  font-weight: normal;
  src: local('Play'), url('http://themes.googleusercontent.com/static/fonts/play/v2/-SXnV4mZjf4oh1IBw13WZw.woff') format('woff');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'), local('OpenSans'), url('http://themes.googleusercontent.com/static/fonts/opensans/v5/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
}

i copied and paste the above css code in my CSS for fonts support.in IE8 Alone the font not supported. is there any fix for that.

هل كانت مفيدة؟

المحلول

The reason that it stops working when you copy the CSS is that Google sends back different CSS depending on the user agent that made the request.

The CSS returned for IE is different to the CSS you've copied.

So, if you're using Google Web Fonts, then use it with <link href.. as recommended.


If you want to host the font locally, read this: How to host google web fonts on my own server?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top