[Resolved] Custom font in GP

Home Forums Support [Resolved] Custom font in GP

Home Forums Support Custom font in GP

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #766441
    Jose Antonio

    Hi!

    I want to put a custom font in a web created with Generatepress, but font don’t shows in the list of typography.

    In functions.php, I add this:

    function tu_add_system_fonts( $fonts ) {
    $fonts[] = ‘Fashion-Fetish’;
    return $fonts;
    }

    And in CSS, I add this:

    @font-face{
    font-family: Fashion-Fetish;
    src: url(https://www.luispablomateo.com/wp-content/uploads/Fashion-Fetish-Bold_0.woff);
    font-weight: normal;
    }

    @font-face{
    font-family: Fashion-Fetish;
    src: url(https://www.luispablomateo.com/wp-content/uploads/Fashion-Fetish-Heavy_0.woff);
    font-weight: bold;
    }

    What’s wrong?

    #766832
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Your function isn’t complete.

    It should look like this:

    add_filter( 'generate_typography_default_fonts','tu_add_system_fonts' );
    function tu_add_system_fonts( $fonts ) {
        $fonts[] = 'Fashion-Fetish';
    
        return $fonts;
    }
    #766882
    Jose Antonio

    Hi Tom,

    Great! I made a silly error… ๐Ÿ˜

    Thanks for your help.

    #767143
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

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