Hey guys this may be beyond the scope of hugo and not related but I have a static/plugins/font.css
file that contains all my fonts across all my projects / themes. I import my fonts.css file in all my headers but that’s wasting resources on the themes that don’t use them since they download to the page anyways, is there a way to programmatically include the fonts in a way that only builds with the fonts I use for a theme? An example of one of my fonts:
@font-face {
font-family: BigShouldersDisplay;
src: url("../../fonts/BigShouldersDisplay-Medium/BigShouldersDisplay-Regular.eot"); /* IE9 Compat Modes */
src: url("../../fonts/BigShouldersDisplay-Medium/BigShouldersDisplay-Regular.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("../../fonts/BigShouldersDisplay-Medium/BigShouldersDisplay-Regular.woff") format("woff"), /* Modern Browsers */
url("../../fonts/BigShouldersDisplay-Medium/BigShouldersDisplay-Regular.ttf") format("truetype"), /* Safari, Android, iOS */
url("../../fonts/BigShouldersDisplay-Medium/BigShouldersDisplay-Regular.svg#BigShouldersDisplay-Regular") format("svg"); /* Legacy iOS */
}```