I have a query ref loading a font locally. I usually load the font into the font folder and then apply the following css.
@font-face {
font-family: 'Courgette';
font-style: normal;
font-weight: 400;
src: url('../fonts/courgette-v13-latin-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/courgette-v13-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/courgette-v13-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/courgette-v13-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/courgette-v13-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/courgette-v13-latin-regular.svg#Courgette') format('svg'); /* Legacy iOS */
font-display: swap; }
However using the code above the font does not load. If I add the full URL inc domain then the font loads as required. The site is under development at the moment so is in /2022 directory. I have already sent you login info for another query on 24/09/22
I did try using the code below in googlefonts.php and calling it from Google which is not something I wanted to do and it still did not work.
$googleFonts['Courgette'] = 'Courgette';
I would appreciate your thoughts?
Thanks
David