Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1327673

    I am now having problems with self-hosted fonts for the first time. In the frontend everything runs as before without problems.
    Where problems appeared now was in the backend. First, where the selected fonts are chosen : “General Styling” the previews were not displayed.

    since I loaded the fonts using a custom plugin and only via wp_enqueue_scripts I thought I could additionally fix the problem via admin_enqueue_scripts. There – see above – the previews were then also displayed in the correct font.

    Unfortunately, the problem was not fixed for the ALB elements that had the config[‘preview’] set to also show the fonts in a correct preview in editor mode.

    What else could be the problem?

    ______________
    PS:
    I embed my local hosted font to the theme setting by:

    function avia_add_content_font($fonts){
        $fonts['Scripter'] = 'Scripter:400';
        return $fonts;
    }
    add_filter( 'avf_google_heading_font',  'avia_add_content_font');
    add_filter( 'avf_available_google_fonts',  'avia_add_content_font');
    #1327674

    Small addendum: I don’t really care that much about seeing the font I host myself in the preview. It would be enough for me if I could pre-select a font for the backend display, which is then also displayed.

    #1327892

    Hi,

    Thank you for the inquiry.

    Do you see any errors in the Network tab of the browser, or did you check if the font is actually loading or not? You should be able to adjust the default font style in the preview with this css code.

    #av-admin-preview {
        font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
    }
    

    You may need to load the style using the admin_head hook.

    Best regards,
    Ismael

    #1328110

    Thanks – Ismael – it seems to be a problem with the special font – “scripter” – that a “web designer” sent me. It is displayed in the frontend, but not in the backend for reasons still unknown to me – when I switch to another self-hosted font I don’t have these problems. – So now I’m going to search for this font myself.

    #1328138

    Hi,
    Glad to hear that you have this sorted out, being a faulty font, shall we close this then?

    Best regards,
    Mike

    #1328571

    yes – but strang it is anyway. Because at frontend the font works.

    #1328636

    Hi,
    Very good, probably how it is corrupt.

    Best regards,
    Mike

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Preview of used fonts in Backend and ALB …’ is closed to new replies.