Site logo

[Resolved] Google font missing font weights

Home Forums Support [Resolved] Google font missing font weights

Home Forums Support Google font missing font weights

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #572758
    Vignesh

    I am trying to use Poppins font with few font weights/variants. But GP is not loading the weights I need. Here is code from page header
    “href=’//fonts.googleapis.com/css?family=Poppins:300,regular,500,600,700”.

    I wanted to use 200 weight.
    Poppins font https://fonts.google.com/specimen/Poppins?selection.family=Poppins.
    I tried using google fonts filter but not working. Your help is appreciated.

    #572859
    Leo
    Staff
    Customer Support

    Hi there,

    Just tested and this worked for me:

    add_filter( 'generate_typography_customize_list', 'lh_add_google_fonts' );
    function lh_add_google_fonts( $fonts ) {
    	$fonts[ 'poppins' ] = array( 
    		'name' => 'Poppins',
    		'variants' => array( '200' ),
    		'category' => 'serif'
    	);
    	
    	return $fonts;
    }
    #573155
    Vignesh

    The above solution worked, Thank you for the support.
    Now I have another problem, I am unable to find “Load essential Icons only” setting. I marked that option a while ago and now wanted to uncheck but it is not there. Attaching screenshot for ref.
    General Settings

    #573170
    David
    Staff
    Customer Support

    Hi Vignesh,

    GP now uses its own Icons so FA essential icons option was removed as it is no longer required. If you want some more info on using FA then read here:

    https://docs.generatepress.com/article/font-awesome/

    #573189
    Vignesh

    Thanks David for the info. But I am trying to include social media icons at footer, but those fontawesome icons are displaying in Customize/Builder modes but disappearing once I publish the site. To achieve that do I need to follow the above mentioned way?

    #573195
    David
    Staff
    Customer Support

    Can you provide a link to the page?

    #573196
    Vignesh
    #573203
    David
    Staff
    Customer Support

    Hi Vignesh yes if you follow the above instructions. Or alternatively as you are using BB you could use one of their widgets as this includes FA when icons are used.

    #573206
    Vignesh

    Thank you David, let me try and update you.

    #573216
    Vignesh

    Hi David,
    I used function to include FA v5 and now it is working fine. Thank you for the timely help.

    #573218
    David
    Staff
    Customer Support

    Glad we could help.

    #573220
    Vignesh

    Thank you again & Have a great day David.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.