-
AuthorPosts
-
November 3, 2021 at 5:31 pm #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');
November 3, 2021 at 5:39 pm #1327674Small 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.
November 5, 2021 at 8:08 am #1327892Hi,
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,
IsmaelNovember 7, 2021 at 4:33 pm #1328110Thanks – 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.
November 7, 2021 at 9:16 pm #1328138Hi,
Glad to hear that you have this sorted out, being a faulty font, shall we close this then?Best regards,
MikeNovember 10, 2021 at 9:17 pm #1328571yes – but strang it is anyway. Because at frontend the font works.
November 11, 2021 at 10:44 am #1328636 -
AuthorPosts
- The topic ‘Preview of used fonts in Backend and ALB …’ is closed to new replies.