Helferlein, um Google-Fonts effizient selber zu hosten

Google Fonts sind über die Google API komfortabel in eine Webseite einzubinden. Um die Schriften selber zu hosten (Ladezeit) – gibt es hier den coolen Helper von Mario Ranfti, welcher ein Font-Face-Snippet generiert und den entsprechenden Google Font direkt zum Download zur Verfügung stellt.

/* roboto-regular - latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/roboto-v29-latin-regular.eot'); /* IE9 Compat Modes */
  src: local(''),
       url('../fonts/roboto-v29-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('../fonts/roboto-v29-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
       url('../fonts/roboto-v29-latin-regular.woff') format('woff'), /* Modern Browsers */
       url('../fonts/roboto-v29-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
       url('../fonts/roboto-v29-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}

Beispiel für das generierte Font-Face-Snippet der Schrift Roboto

1 Star2 Stars3 Stars4 Stars5 Stars (1)

Deine Meinung ist uns wichtig! Auch wenn du denkst, dass unser Beitrag so spannend wie eine Präsentation über die Vorteile von Kalkulationstabellen ist, teile es uns mit!

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert