Site logo

[Resolved] Upload custom fonts

Home Forums Support [Resolved] Upload custom fonts

Home Forums Support Upload custom fonts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1504038
    Sanu Kumar

    How can I install Google’s “Inter” font in GP?

    #1504047
    Elvin
    Staff
    Customer Support
    #1504054
    Sanu Kumar

    I added this php but “Inter” font is not showing.

    add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
    function tu_add_google_fonts( $fonts ) {
    	$fonts[ 'zilla_slab' ] = array( 
    		'name' => 'Zilla Slab',
    		'variants' => array( '300', '300i', '400', '400i', '500', '500i', '600', '600i', '700', '700i' ),
    		'category' => 'serif'
    	);
    	
    	return $fonts;
    }
    #1504061
    Elvin
    Staff
    Customer Support

    You have to change the values in it.

    Example: change $fonts[ 'zilla_slab' ] to $fonts[ 'inter' ].

    also since Inter is a san-serif font, change 'category' => 'serif' to ‘category’ => ‘sans-serif’.

    You can also change what font-weights you need on the ‘variants’ value.

    #1504065
    Sanu Kumar

    thank you Elvin

    #1504079
    Elvin
    Staff
    Customer Support

    No problem. 🙂

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