[Resolved] System Stack – How to Make it Serif?

Home Forums Support [Resolved] System Stack – How to Make it Serif?

Home Forums Support System Stack – How to Make it Serif?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1376609
    Robin

    Hey there – I have my typography set to System Stack, however it shows up as ‘Sans Serif’.

    Is there a way to make it ‘Serif’. Thanks.

    #1377020
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can filter the system stack font to be whatever you like:

    add_filter( 'generate_typography_system_stack', function() {
        return 'serif';
    } );

    Let us know if you need more info ๐Ÿ™‚

    #1377067
    Robin

    Thanks, Tom. That did it.

    #1377171
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

    #1377642
    Robin

    I decided against using Serif on my site. I have removed Tom’s script and…

    …typeset in Inter but the fallback font is still serif.

    I’ve been looking for at least an hour. Any ideas of how I can remove the fallback serif font?

    TIA

    #1377710
    David
    Staff
    Customer Support

    Hi there,

    how are you adding the Inter font to the site ?

    #1377804
    Robin

    Hi David,

    I have selected the Inter font from Customizer > Typography > Body and numerous Headings.

    I also have this snippet installed:

    add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
    function tu_add_google_fonts( $fonts ) {
    	$fonts[ 'inter' ] = array( 
    		'name' => 'Inter',
    		'variants' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900' ),
    		'category' => 'serif'
    	);
    
    	return $fonts;
    }

    Is that of help? TIA

    #1378226
    Tom
    Lead Developer
    Lead Developer

    What if you set the category to sans-serif?

    #1378339
    Robin

    Thanks, Tom. I had to turn off the snippet and then turn it back on for the changes to take effect.

    Is there much difference in page loading if I use Inter font compared to Inherit?

    Many thanks to both of you for your help.

    #1378576
    Tom
    Lead Developer
    Lead Developer

    System stack will be more performant, as nothing has to be downloaded by the browser.

    Google fonts will always cause a bit of a performance hit, as the browser needs to download the fonts from Google.

    #1378584
    Robin

    Thanks, Tom.

    #1378586
    Tom
    Lead Developer
    Lead Developer

    No problem!

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