[Resolved] Unable to select all weights of fonts

Home Forums Support [Resolved] Unable to select all weights of fonts

Home Forums Support Unable to select all weights of fonts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1371153
    madmanweb

    Hi.

    I’m trying to customise the fonts for my site headings. I’m using Playfair Display from Google fonts.

    As you can see from their font page, it comes in various weights:
    https://fonts.google.com/specimen/Playfair+Display

    But in GP customiser, I can only see a limited set of weights: 700 and 900.

    Changing the font weight in the variant drop-down does nothing visually.

    Screenshot here: https://i.imgur.com/ei1DIPh.png

    Short of manually loading the fonts and adding CSS, is there any way around this problem?

    (Somewhat related: when are we getting support for variable fonts?)

    #1371430
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can manually update the entry like this:

    add_filter( 'generate_google_fonts_array', function( $fonts ) {
        $fonts['playfair_display']['variants'] = array( '300', '400', '500' ); // Add as many as you like.
    
        return $fonts;
    } );

    Our Typography system is quite dated and difficult to migrate in a backward-compatible way. Once we get GP 3.0.0 and GPP 1.11.0 released, we’ll be looking at completely re-building it.

    #1371503
    madmanweb

    Thanks.

    #1372390
    Tom
    Lead Developer
    Lead Developer

    No problem!

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