Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include Google Font in JSFiddle?

I'm trying to include a Google font in jsFiddle without success. I added the URL to "External Resources" but it is included as a <script>.

Screenshot

This is the font that I want to include:

<link href='http://fonts.googleapis.com/css?family=Oswald:400,700,300' rel='stylesheet' type='text/css'>
like image 208
Gustavo Avatar asked Nov 03 '14 15:11

Gustavo


2 Answers

Webfonts must be included in the CSS quadrant, using @import:

@import url(//fonts.googleapis.com/css?family=Oswald:400,700,300);
like image 189
Gustavo Avatar answered Oct 06 '22 01:10

Gustavo


You can use dataURL if you haven't got any url online(only available on local computer)

@font-face {
  font-family: 'us101';
  src: url(data:font/truetype;charset=utf-8;base64,AAEAAAASAQA...);
}
like image 33
artgb Avatar answered Oct 06 '22 03:10

artgb