We now provide info about fonts set in admin in our shoptet.config
object. This information should be used to load only those font, that is enabled in admin.
Example of structure:
{
"google": {
"families": [
"Source Sans Pro:300,400,700,900&subset=latin-ext",
"Exo 2:300,400,700,900&subset=latin-ext"
]
},
"custom": {
"families": [
"shoptet"
],
"urls": [
"http://cdn.myshoptet.com.test:8080/tpl/489fb55e/11/master/templates/frontend_templates/11/css/modules/font-shoptet.css"
]
}
}
We strongly recommend using Web Font Loader https://github.com/typekit/webfontloader in your template addons to avoid unnecessary loading of unused fonts.