Skip to content

Instantly share code, notes, and snippets.

@framp
Created June 13, 2014 12:41
Show Gist options
  • Save framp/11190fdd48f994f3c748 to your computer and use it in GitHub Desktop.
Save framp/11190fdd48f994f3c748 to your computer and use it in GitHub Desktop.
Just a small snippet to filter out the great list of font at http://blog.squarespace.com/blog/curated-typography
var fonts = Array.prototype.slice.call(document.querySelectorAll('.font'));
var state = ['none', 'block'];
var condition = function(i, skip){
return i.childNodes[0].className.indexOf(skip)===-1;
}
var filter = function(skip, i){
i.style.display = state[condition(i, skip)>>0];
};
fonts.forEach(filter.bind(null, 'Typekit'));
@framp
Copy link
Author

framp commented Jun 13, 2014

Or if you're into one-liners: Array.prototype.slice.call(document.querySelectorAll('.font')).forEach(function(i){ i.style.display = i.childNodes[0].className.indexOf('Typekit')===-1 ? 'block' : 'none'; })

@framp
Copy link
Author

framp commented Sep 12, 2014

Google only list:
SANS SERIF
Abel
Alegreya Sans
Asap
Cabin
Dosis
Droid Sans
Exo 2
Josefin Sans
Lato
Montserrat
Open Sans
Oswald
PT Sans
Raleway
Roboto
Roboto Condensed
Source Sans Pro
Titillium Web
Ubuntu
Varela Round

SERIF
Alegreya SC
Alice
Crimson Text
Droid Serif
IM Fell English
Libre Baskerville
Lora
Merriweather
Noto Serif
Old Standard TT
PT Serif
Sorts Mill Goudy
Volkhov

SLAB SERIF
Arbutus Slab
Arvo
Bitter
Glegoo
Josefin Slab
Roboto Slab
Sanchez

DISPLAY
Alfa Slab One
Amatic SC
Black Ops One
Cinzel Decorative
Flamenco
Graduate
Gruppo
Julius Sans One
Lancelot
Nixie One
Permanent Marker
Playfair Display
Playfair Display SC
Rye
Spirax
Ultra
Vast Shadow

SCRIPT
Lily Script One
Lobster Two
Oleo Script
Playball
Sail

MONO
Droid Sans Mono
Inconsolata
PT Mono
Source Code Pro
Ubuntu Mono

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment