Created
October 2, 2020 17:18
-
-
Save kyle-wendling/7762d1150927204b41dd194e56404f31 to your computer and use it in GitHub Desktop.
All Google Font Preview Full List
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<div id="preview"></div> | |
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> | |
<script> | |
$(function() { | |
$.getJSON('https://raw.githubusercontent.com/jonathantneal/google-fonts-complete/master/google-fonts.json', function(fonts) { | |
$(`<h1/>`).text(`${fonts} length`).appendTo($('#preview')); | |
$.each(fonts, function(k, v) { | |
//if (v.category!=='sans-serif') return; //filter only sans-serif fonts. replace with your filter condition(s) | |
var css = `@import url('https://fonts.googleapis.com/css?family=${k}');`; | |
$('<style/>').append(css).appendTo(document.head); | |
$(`<h1 style="font-family: '${k}'"/>`).text(`${k}: The quick brown Fox goes to Disney`).appendTo($('#preview')); | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment