-
-
Save adamhut/790aa09886944e3b88717602892fec38 to your computer and use it in GitHub Desktop.
List all font styles being used on the page
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
var ret={}; | |
$('*').each(function () { | |
var str = $(this).css('font-family'); | |
str = str + ':' + $(this).css('font-weight'); | |
str = str + ':' + $(this).css('font-style'); | |
if (ret[str] ) { | |
ret[str] = ret[str] + 1; | |
} else { | |
ret[str] = 1; | |
} | |
}); | |
console.log(ret); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment