Archived topic
Adding second Adobe Font doesn't work
7 replies · Started by Jordi on December 17, 2021
When adding fonts according to https://docs.generatepress.com/article/installing-gp-premium/, the second font doesn't work when adding new font in Customize - Typography -> Font Manager. It won't show on the front-end. What am I missing?
Hi there,
i assume you mean this doc?
https://docs.generatepress.com/article/adding-local-fonts/
With GP 3.1 after adding the @font-face CSS make a note of the font-family name in that CSS eg. my-font
Then in Customizer > Typography --> Font Manager >>> Add Font. In the Font Family Name Field enter the font family name. It must be exactly the same as the @font-face name eg. my-font
Hi David,
Sorry, wrong link, should be https://generatepress.com/forums/topic/adobe-fonts/. I got the first Adobe Font Univia Pro to work, but the second one I want to use (Neue Haas Unica) doesn't work. Code snippet looks like this:
add_filter( 'generate_typography_default_fonts', 'tu_add_typefit_fonts' );
function tu_add_typekit_fonts( $fonts ) {
$fonts[] = 'univia-pro';
$fonts[] = 'neue-haas-unica';
return $fonts;
};
After that same steps as for Univia Pro (add to Customize - Typography etc.)
That snippet only works with the Old Typography system.
And all it did was to add the Font name to the Customizer Font List - it did nothing else.
You need to make sure that your AdobeTypeKit includes that font. And whatever font-family name it uses is what you type into the font family name field in the Customizer.
The webkit definitely included both fonts, so the reference to the CSS in Elements -> Hook -> Show on all site (<link rel="stylesheet" href="https://use.typekit.net/znj6old.css">) is correct. I'm also positive the name is correct in the font family name field in the Customizer...
If that's the old way to do it, could you please explain the new one? So I can use both fonts?
Would it be helpful if I created a temp account so you can check with me? Thanks in advance!
I am see this CSS on the site:
body, button, input, select, textarea {
font-family: Neue Haas Unica;
}
So the font family name is incorrect in the Font Manager. It needs to be: neue-haas-unica
Can you check that?
Thanks! It's weird that I didn't have to do that for the first font, but it works now. Thank you!
Glad to hear that!