Site logo

Archived topic

Advice on adding a non Google font.

11 replies · Started by Weatherly on December 3, 2020

Viewing posts 1–12 of 12

We followed all the advice here: https://docs.generatepress.com/article/adding-local-fonts/ as much as possible (it isn't a Google font) and on the back end our new font is showing. It even shows in Customizer. However it is not displaying on the front end. It keeps defaulting to local fonts. It shows the font listed in the inspector. This same font was on the old theme and shows fine there. The folder with the font was copied completely from the previous theme (the live site) into a Generatepress child theme (currently in development).
Are we missing a step or something?

Hi there,

Your CSS doesn't seem complete: https://www.screencast.com/t/Z0pvB6b4yR

Try adding the full URLs to each font file in there so you can browse to the URL and your browser downloads the font.

Then it should work.

Let us know :)

I had the complete URL first. I didn't try the relative URL until I found out it didn't work.

Have you tried loading those URLs in your browser? Do they download the font or go to a 404?

If they go to a 404, you need to update the URL so they go to the correct location of the file.

It does say Page can't be found. However, when you look in the child theme editor the /fonts/nalhand.svg at least is clearly visible.
OK I'm copying it straight out of cpanel now. And now it will taking me and ask if I want to download if I put that URL in the browser bar. Yet it still doesn't load on the page.

Hmm, it all seems to be set up correctly now.

What happens if you try a different font? Perhaps there's something wrong with those files?

I still haven't figured out the correct way to do this. I even downloaded fresh copy of the font from a font repository. The only way it works is by using a special font plugin. I have no idea what that is doing different and it doesn't work with some of the other plugins I am using.
This is WEIRD.

Did you try a completely different font just so we can confirm it's something with the loading of the font vs the font files themselves?

Not exactly. What I did was download the font (Nal Hand) from an entirely different source. Before I was using the fonts from the former theme's folder. This time I went straight to the developers. And of course, if it was the font files wouldn't they have also broken in the old theme?

yes. oddly I'm forced to use a plugin to get it to work. why I couldn't css it I have no idea.

Strange indeed - let me know if you try again without the plugin, will be happy to take another look.

This archived topic is closed to new replies.