[Support request] Custom Font in Editor & Hyphenation issues

Home Forums Support [Support request] Custom Font in Editor & Hyphenation issues

Home Forums Support Custom Font in Editor & Hyphenation issues

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2394952
    Sascha

    Hi

    on this site I have applied custom font “CourierNew”, which is not rendered in the Editor, although I have added this filter:

    add_filter( 'block_editor_settings_all', function( $editor_settings ) {
        $css = wp_get_custom_css_post()->post_content;
        $editor_settings['styles'][] = array( 'css' => $css );
    
        return $editor_settings;
    } );

    Secondly, I have applied a hyphenation-rule for enhancing readability:

    body {
        -ms-hyphens: auto;
        -webkit-hyphens: auto;
        hyphens: auto;
    }

    but now I’d like to disable it for the email-address, which is displayed in the footer, which may lead to showing a wrong address. How can I disable it for this phrase?

    Thank you in advance and kind regards,
    Sascha

    #2395111
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to the site ?

    #2395601
    Sascha

    Oops, sure, here it is, pls find admin-login in private note

    #2395824
    Ying
    Staff
    Customer Support

    Hi Sascha,

    The PHP snippet you are using adds the CSS of additional CSS field to editor, but your @font-face CSS is in the child theme, so try this snippet instead:

    add_filter( 'generate_editor_styles', function( $editor_styles ) {
        $editor_styles[] = 'your-editor-style.css';
    
        return $editor_styles;
    } );

    change the your-editor-style.css to the name of your stylesheet.

    For the hyphen CSS, try this to override yours:

    .site-footer span#eeb-903191-172554 {
        hyphens: none;
    }
    #2396523
    Sascha

    Hi Ying, thank you for your reply.

    New snippet works perfectly, nice 🙂

    The hyphen issue remains, as you can see on this screenshot. Or is this due to the margin or padding inside the footer-container?

    Thank you in advance and kind regards,
    Sascha

    #2396575
    David
    Staff
    Customer Support

    The hyphen issue is due to lack of space.
    If you edit the Grid, and switch to Tablet view you can set each grid column to 50%.
    That should make sure the columns are wide enough to keep that line intact.

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