<div id="font"></div>
<script>
(function() {
const fontSize = 'small';
const effectSize = 'x-large';
const fontText = 'Webの無料フォント0123456789';
var fontName = [];
fontName[0] = "'MS ゴシック','MS Gothic'";
fontName[1] = "'MS 明朝','MS Mincho'";
fontName[2] = "'游明朝','Yu Mincho'";
fontName[3] = "'MS UI Gothic'";
fontName[4] = "'ヒラギノ角ゴ ProN W3'";
var text='';
for(var i = 0 ; i < fontName.length ; i++){
text += '<span style="font-size: ' + fontSize + ';">';
text += 'font-family: ' + fontName[i] + ';';
text += '</span>';
text += '<br>';
text += '<span style="font-size: ' + effectSize + '; font-family: ' + fontName[i] + ';">';
text += fontText;
text += '</span>';
if(i != fontName.length){text += '<br>';}
}
document.getElementById("font").innerHTML = text;
}());
</script>
http://unitopi.com/font-family-css/