- This topic has 4 replies, 3 voices, and was last updated 8 months ago by
David.
-
AuthorPosts
-
May 26, 2020 at 8:32 am #1302286
Ashin
I’m trying to change the font style of my website to Proxima Nova. Here is what I did.
1. Uploaded woff, woff2, eot and ttf formats to Media folder.
2. Using Simple CSS added the following CSS code –@font-face {
font-family: ‘Proxima Nova’;
src: url(‘https://sitename.com/wp-content/uploads/2020/05/proximanova-regular-webfont.eot’); /* IE9 Compat Modes */
src: url(‘https://sitename.com/wp-content/uploads/2020/05/proximanova-regular-webfont.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */
url(‘https://sitename.com/wp-content/uploads/2020/05/proximanova-regular-webfont.woff2’) format(‘woff2’), /* Super Modern Browsers */
url(‘https://sitename.com/wp-content/uploads/2020/05/proximanova-regular-webfont.woff’) format(‘woff’), /* Pretty Modern Browsers */
url(‘https://sitename.com/wp-content/uploads/2020/05/proximanova-regular-webfont.ttf’) format(‘truetype’), /* Safari, Android, iOS */
}Changed the site name in the above code for privacy reasons.
3. Then using Code Snippets, added two codes.
PHP code for adding Proxima Nova to GeneratePress list
add_filter( ‘generate_typography_default_fonts’, function( $fonts ) {
$fonts[] = ‘Proxima Nova’;return $fonts;
} );Then to remove Google Fonts –
add_action( ‘wp_enqueue_scripts’, function() {
wp_dequeue_style( ‘generate-fonts’ );
} );4. Then I changed everything to Proxima Nova in the Typography of Customiser.
But after all, there seems to be no change. Would you help me understand what went wrong? I got all these codes from this forum and your help guides.
May 26, 2020 at 3:31 pm #1302692Tom
Lead DeveloperLead DeveloperHi there,
All of your quotes in your CSS are “curly” quotes. Can you retype them so they’re straight quotes?
That might fix it.
Let me know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMay 26, 2020 at 8:49 pm #1302926Ashin
I’ve changed it all. But still not working.
May 27, 2020 at 2:07 am #1303169Ashin
It does work when I put the option of ‘Default’ in pages built using Elementor. That means, the font is uploaded correctly and is set as ‘Default’ font when Elementor check for it. But it’s not showing on elements that are shown from GeneratePress’s side. eg- font on the home page or on any page built without elementor.
May 27, 2020 at 3:37 am #1303232David
StaffCustomer SupportHi there,
in your fontface CSS you have a
,
comma after the last font rule – remove that.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.