Created
April 8, 2016 02:17
-
-
Save siamkreative/1c4607bc90c94b4b9f70531e1eccd9ef to your computer and use it in GitHub Desktop.
Web Safe Font Combinations. Based on http://www.w3schools.com/cssref/css_websafe_fonts.asp
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
jQuery(document).ready(function ($) { | |
var select = $('#taed-font-family'); | |
var fontTypes = []; | |
var fontsOptions = ''; | |
$.getJSON('/websafefonts.json', function (json) { | |
$.each(json.fonts, function (type, fontArr) { | |
fontTypes.push(type); | |
$.each(fontArr, function (index, font) { | |
fontsOptions += '<option value="' + font + '" class="fonttype" data-type="' + type + '">' + font + '</option>' | |
}); | |
}); | |
select.append(fontsOptions); | |
}); | |
}); |
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
{ | |
"lastUpdated": 1457672759, | |
"count": 13, | |
"source": "http://www.w3schools.com/cssref/css_websafe_fonts.asp", | |
"fonts": { | |
"serif": [ | |
"Georgia, serif", | |
"'Palatino Linotype', 'Book Antiqua', Palatino, serif", | |
"'Times New Roman', Times, serif" | |
], | |
"sansserif": [ | |
"Arial, Helvetica, sans-serif", | |
"'Arial Black', Gadget, sans-serif", | |
"'Comic Sans MS', cursive, sans-serif", | |
"Impact, Charcoal, sans-serif", | |
"'Lucida Sans Unicode', 'Lucida Grande', sans-serif", | |
"Tahoma, Geneva, sans-serif", | |
"'Trebuchet MS', Helvetica, sans-serif", | |
"Verdana, Geneva, sans-serif" | |
], | |
"monospace": [ | |
"'Courier New', Courier, monospace", | |
"'Lucida Console', Monaco, monospace" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment