[Support request] Adding google fonts

Home Forums Support [Support request] Adding google fonts

Home Forums Support Adding google fonts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1998961
    Josh

    I Can usually add google fonts to my site, but after the new updates it seems to not be working.

    I add this code to my functions.php

    
    add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
    function tu_add_google_fonts( $fonts ) {
    	$fonts[ 'midieval_sharp' ] = array( 
    		'name' => 'Midieval Sharp',
    		'variants' => array( '400' ),
    		'category' => 'cursive'
    	);
    
    	return $fonts;
    }

    Then I would go to the customizer and choose the font that I want. After the update I have to add a font first. My font does not display in the options though, even when my code has been placed in my functions.php.\

    Is there a new way this is supposed to be achieved?

    #1998994
    Leo
    Staff
    Customer Support

    Hi Josh,

    Are you using the new Dynamic Typography introduced in GP 3.1 now?
    https://generatepress.com/generatepress-3-1-global-colors-dynamic-typography/

    If so we’ve updated the doc article here:
    https://docs.generatepress.com/article/adding-local-fonts/

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