I am trying to install a font to be used offline while developing a Wordpress website. This is what I have tried to do, and it still does not work:
- Created the fonts via fontsquirrel.com
- added the contents of the file to /wp-content/themes/myTheme/font
- in my style.css file I added the following code :
@font-face {
font-family: 'latobold';
src: url('/font/Lato-Bold-demo.eot') format('eot');
src: url('/font/Lato-Bold-webfont.eot?#iefix') format('embedded-opentype'),
url('/font/Lato-Bold-webfont.woff2') format('woff2'),
url('/font/Lato-Bold-webfont.woff') format('woff'),
url('/font/Lato-Bold-webfont.ttf') format('truetype'),
url('/font/Lato-Bold-webfont.svg#latobold') format('svg');
font-weight: normal;
font-style: normal;
}
- I then tried to change the body font via the following code :
body {
font-family: 'latobold', sans-serif;
}
My font defaults to something else sans-serif. If I remove the sans-serif, it's Times New Roman. I think I have a url pathname issue.