July 24, 2019 at 11:54 pm #308127
What do I put as the src for @font-face? For example:
src: url(“/fonts/Roboto-Regular.eot?#iefix”) format(’embedded-opentype’),
Where does Use Any Font put the fonts locally, and how can I reference them? An example would be appreciated.July 25, 2019 at 11:38 am #308296
Use Any Font stores the font file in wp-content/uploads/useanyfont folder. You can reference the font file from there.
But it is not needed to do that. As you can just assign the font family or class (same as font name) and it should take the effect.
ThanksJuly 25, 2019 at 1:07 pm #308319
What do you mean by this
As you can just assign the font family or class (same as font name) and it should take the effect.
Assign it where? And how? Please provide an example, thanks.July 26, 2019 at 12:31 pm #308609
What you are trying to achieve here ? I can suggest you as per it.
ThanksJuly 26, 2019 at 1:30 pm #308633
Thanks, Dinesh. I’m trying to load Google Fonts locally, then only fallback to the Google fonts servers if local isn’t available. And also trying to take advantage of the new font-display: swap option. So the css would look something like this.
src: local(‘Lobster Regular’), local(‘Lobster-Regular’), url(https://fonts.gstatic.com/s/lobster/v21/neILzCirqoswsqX9zo-mM5Ez.woff2) format(‘woff2’);
In the Use Any Font list of fonts that are uploaded, can I use the names directly? So if I have something like “montserrat-italic” in the font list, can I use it in the above css as src: local(‘montserrat-italic’) ?
Thanks for your help.July 29, 2019 at 11:18 am #309316
You don’t need to do this. You can just use our plugin and then it will work for all (either fonts available locally or not. )
The topic ‘How do use @font-face with Use Any Font’ is closed to new replies.