[Support request] Adobe Typekit in generateblocks

Home Forums Support [Support request] Adobe Typekit in generateblocks

Home Forums Support Adobe Typekit in generateblocks

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1176076
    Heinrich

    hi team,

    want to use adobe fonts in blocks (button). fonts are added and working fine in customizer. if i try to create a button in blocks, the defined font is not used and i can`t find my adobe font in advanced typo. any idea?

    #1176656
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You would need to load the Typekit javascript inside the block editor. How are you adding it to the front-end of the site currently?

    #1176690
    Heinrich

    hi tom,

    i integrate the fonts in two steps:

    1. step: a hook: <link rel=”stylesheet” href=”https://use.typekit.net/xxxxxxxx.css”&gt;
    2. snippet to add the fonts in the customizer:
    add_filter( ‘generate_typography_default_fonts’, ‘tu_add_typekit_fonts’ );
    function tu_add_typekit_fonts( $fonts ) {
    $fonts[] = ‘itc-fenice’;
    $fonts[] = ‘trade-gothic-next’;

    return $fonts;
    };

    seems i need a third step?

    #1176830
    Tom
    Lead Developer
    Lead Developer

    You need to hook the Typekit URL into the block editor:

    add_action( 'enqueue_block_editor_assets', function() {
        wp_enqueue_style( 'typekit', 'https://use.typekit.net/xxxxxxxx.css' );
    } );

    Then just add your font family name into the Font family field.

    #1177141
    Heinrich

    hi tom,
    snippet added. the font doesn`t appear in the font list, but you mean manually type the font family below the font list? screenshot her:

    https://drive.google.com/open?id=1PSMD4hrG86X0oclop_NXdYxHtpLL6o6_

    screenshot

    #1177375
    David
    Staff
    Customer Support

    In the Select font... field change this to Other
    And then in the field you have highlighted add your Typekit Font name

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