choffmeister / roboto-fontface-bower

Bower package for the Roboto font-face
Apache License 2.0
153 stars 57 forks source link

Leverage local font first, then request #20

Closed lijunle closed 8 years ago

lijunle commented 8 years ago

Do something like this:

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  src: local('Roboto Light'), local('Roboto-Light'), url(http://fonts.gstatic.com/s/roboto/v15/0eC6fl06luXEYWpBSJvXCBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
  unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}

See: http://www.broken-links.com/2009/06/30/checking-for-installed-fonts-with-font-face-and-local/

Check google provided CSS: http://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,700

choffmeister commented 8 years ago

Good idea. Will integrate this tomorrow.