This question has been flagged
1 Reply
2098 Views

Ok, so the ones in charge got picky and want that to use a certain font to be used on the website. Despite my encouragement to opt for a google font they wanted another one and we bought a pay as you go license from fonts dot com.


Now i want to make it available in the theme.


The allowed google fonts in my theme are for now defined this way:


$o-theme-font-configs: (
'EB Garamond': (
'family': ('EB Garamond', serif),
'url': 'EB+Garamond:400,400i,500,500i,600,600i,700,700i,800,800i,900,900i',
),
'Lato': (
'family': ('Lato', sans-serif),
'url': 'Lato:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i',
),
);


But now i want to add the other webfont to that array of fonts in the theme.


I need to add a javascript, which i added to the bundle, and i need to refer to the font as such according to the font dot com docs:


@font-face{
font-family:"FancyFont Regular";
src:url("fonts/fancyfont.woff2") format("woff2"),url("fonts/fancyfont.woff") format("woff");
}


the woff files i can put in /mytheme/static/src/fonts/ 


The 

$o-theme-font-configs

Seems to be a translation step ?



Avatar
Discard