[Support request] Generatepress adding font with sans-serif

Home Forums Support Generatepress adding font with sans-serif

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1341669
    jose

    I added a custom font with:

    add_filter('generate_typography_default_fonts', function ($fonts) {
        $fonts[] = 'colaborate';
        return $fonts;
    });

    The font loads OK with @font-face css

    My main issue is, how can i add sans-serif as secundary font while colaborate loads?

    I have

    body, button, input, select, textarea {
        font-family: "colaborate";
        font-weight: 100;
        font-size: 20px;
    }

    I want

    body, button, input, select, textarea {
        font-family: "colaborate", sans-serif;
        font-weight: 100;
        font-size: 20px;
    }
    #1341918
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This is a flaw with the current typography system.

    We’ll be completely re-writing it in GP 2.6/GPP 1.12.

    For now, the easiest workaround is to filter the “System Stack” value to be your custom font.

    For example:

    add_filter( 'generate_typography_system_stack', function() {
        return '"colaborate", sans-serif';
    } );

    Then choose “System Stack” in the Customizer to utilize your font.

    It’s 100% a “workaround”, but it’s the best option until that Typography revamp is ready to go.

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