- This topic has 7 replies, 2 voices, and was last updated 2 years, 4 months ago by David.
-
AuthorPosts
-
December 17, 2021 at 4:03 am #2051820Jordi
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?
December 17, 2021 at 5:10 am #2051872DavidStaffCustomer SupportHi 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
December 17, 2021 at 5:34 am #2051901JordiHi 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.)
December 17, 2021 at 5:43 am #2051907DavidStaffCustomer SupportThat 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.
December 17, 2021 at 5:46 am #2051909JordiThe 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!
December 17, 2021 at 5:50 am #2051913DavidStaffCustomer SupportI 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?
December 17, 2021 at 6:39 am #2051943JordiThanks! It’s weird that I didn’t have to do that for the first font, but it works now. Thank you!
December 17, 2021 at 6:46 am #2051950DavidStaffCustomer SupportGlad to hear that!
-
AuthorPosts
- You must be logged in to reply to this topic.