[Resolved] Local fonts show up in Customizer list but do not load correctly

Home Forums Support [Resolved] Local fonts show up in Customizer list but do not load correctly

Home Forums Support Local fonts show up in Customizer list but do not load correctly

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1404952
    NBC

    I’m attempting to switch from Google fonts to local hosting of a free typeface family I obtained from Font Squirrel.

    I’ve followed the instructions on your Adding Local Fonts article (https://docs.generatepress.com/article/adding-local-fonts/).

    The typefaces show up at the end of the System Stack list, but when I attempt to apply them, I get a generic substitution instead of the typeface itself.

    I’ve created a new user and am sending you the details via the Account Issue form.

    Any chance you could point me to the error of my ways?

    The subhead on the home page uses h2, which is the style I’ve attempted unsuccessfully to switch to the new typeface.

    Thank you! There’s a dent in the wall where I’ve been banging my head (metaphorically speaking) trying to figure this one out.

    (WP, GP/GPP, plug-ins all up to date)

    [ETA: I’ve added the CSS and PHP to my child theme.]

    #1405137
    David
    Staff
    Customer Support

    Hi there,

    i can see the @font-face CSS in your child theme however:

    1.If i follow a Font URL in your CSS its takes me to a Not Found page.
    Check the URL to make sure it matches the fonts location.

    2. The only font i see selected is Josefin Sans. Can you makes sure the $font property in this filter matches the font-family in your @font-face CSS :

    add_filter( 'generate_typography_default_fonts', function( $fonts ) {
        $fonts[] = 'Open Sans';
    
        return $fonts;
    } );
    #1405157
    NBC

    You’re seeing Josefin Sans because I didn’t switch the style to a typeface that wouldn’t load. But the not-found error message pushed me to reexamine how I had specified the file paths. Bingo! (Duh)

    It’s all too easy to assume the error is not in what one’s certain is correct. Thanks, David!

    #1405464
    David
    Staff
    Customer Support

    All too easy to get a URL mixed up 🙂 Glad to hear you got that resolved !

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