[Resolved] Block editor font style not matching front end

Home Forums Support [Resolved] Block editor font style not matching front end

Home Forums Support Block editor font style not matching front end

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #820281
    Maria

    I’m using a custom font from Adobe Fonts for my body text and it displays the way it’s supposed to on the front end, but in the block editor it shows up as the font selected in the Customizer, not the custom Adobe Font. Is there a way to get the custom font to show in the editor so the back end style matches the front end?

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #821012
    David
    Staff
    Customer Support

    Hi there,

    the font would need to be added locally and listed ( and selected ) within the customizer:

    https://docs.generatepress.com/article/adding-local-fonts/

    #821131
    Maria

    I’ve added the code to the head section per Adobe’s instructions:
    <link rel=”stylesheet” href=”https://use.typekit.net/qdm6qye.css”&gt;

    I’ve added the filter to functions.php:
    add_filter( ‘generate_typography_default_fonts’, function( $fonts ) {
    $fonts[] = ‘kepler-std’;

    return $fonts;
    } );

    The custom font now appears in the Customizer. I selected it for the body. It displays correctly on the front end. The font also displays in the editor, but not the correct font weight. Do I need to do something with the block editor files to display the correct font weight? It’s a minor detail, just wondering why the editor doesn’t match the front end like it’s supposed to.

    #821170
    David
    Staff
    Customer Support

    The editor doesn’t ( currently ) load the font weight for the body. It applies to headings etc.
    If its really important then i am sure we can provide something to make that work?

    #821299
    Maria

    Thanks for the explanation and all of your help. Much appreciated!

    #821321
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.