Forum Replies Created
-
AuthorPosts
-
I have kind of find a solution!
I started from zero following these instructions again:
https://kriesi.at/support/topic/loading-google-fonts-locally-for-gdpr-compliance/However, instead of using Font Squirrel to convert the .ttf file to woff and woff2 files I used this tool:
I uploaded the woff and woff2 files again, just with the Enfold Custom Font Manager, and now when you take a look at https://www.option-webdesign.nl the variable font can be changend from 300 to 800 in 1 steps, so 300-01-302… and so on. The variable font is working!
However, I do have 2 questions left:
– It seems that after all the only issue here was using Font Squirrel?
– I now have a file size of 274kKB for my Open Sans variable font:
https://www.option-webdesign.nl/wp-content/uploads/avia_fonts/type_fonts/opensans/opensans-variablefontwdthwght.woff2Is that the normal font size for the Open Sans variable font? Maybe Guenni007 can answer that for me?
Thanks a lot :)
AlwinHello Yigit,
One more try:
1 – I used /* $css .= ” font-weight: {$info[‘weight’]};\r\n”; */
2 – I uploaded the variable font again with Enfold Custom Font Manager
3- I disabled CSS file merging and compression in Enfold performance settings
4 – Cleared and preloaded the cache with WP-RocketCan you please look again? I see still nothing changed…
Hello Yigit,
That did not help either… still only 400 and 600 styles as you can see on https://www.option-webdesign.nl
Yigit, you mean deleting this line?
$css .= ” font-weight: {$info[‘weight’]};\r\n”;I have tried the workaround from Yigit, but it does not change anything. The variable font is still only working with 400 and 600 styles.
So it looks to me (Guenni007 said the same thing) that the problem is not in the Enfold uploader.
I will give the workaround from Yigit a try now, and let you know if it worked for me,
Hello Yigit,
I can not see the private content field below..
Can you please answer the last questions from Guenni007 for me?
(so why is the uploaded variable font only working with 400 and 600 styles?)
Thanks a lot :)
Best Wishes,
Alwinhow did you get the woff2 from that open sans font?
I followed these instructions:
https://kriesi.at/support/topic/loading-google-fonts-locally-for-gdpr-compliance/So I used https://www.fontsquirrel.com/tools/webfont-generator to get the woff2
Hello Guenni007,
It’s only becoming more complex for me… :)
Let’s go back to my website greenconnections.nl
In Firefox developer tools I can see that when I drag the slider for Width, it seems that all Width settings are working fine.
When I drag the slider for Weight I see that there are only 2 weights available: 400 and 600, which are both working fine.
Can you please answer these questions for me:
– Now, weight 400 is Normal and 600 is Bold, correct?
– If I only need 400 and 600 weights in my design, then everything is fine with this website and I don’t need to change anything or ad CSS?
– If I want more styles then only 400 and 600 I have to ad this code to my Child Theme CSS?
@font-face { src: url('/wp-content/uploads/avia_fonts/type_fonts/opensans-variable.woff2') format('woff2'); font-family:'Open Sans Variable'; font-weight: 300 800; font-stretch: 75 100; font-style: normal; }
Hello Guenni007,
Thank you for your help! A lot of recommendations and unfortunately I do not understand everything you saying.
I have installed a variable font on one of my websites now, which is https://www.greenconnections.nl
– I have uploaded the variable font Open Sans, via Custom Font Manager in Enfold settings.
– It’s the only font I use on this website
– I have uploaded 2 files opensans-variablefont_wdthwght-webfont.woff and opensans-variablefont_wdthwght-webfont.woff2 in one folder named “Open Sans”
– In Custom Font Manager it is listed as: Font: Open Sans ( font-family: open-sans ) normal: 400
– Set Open Sans (400) as my default font in Enfold settingsIf you please could take a look at my website, for my eyes everything is working fine, and different styles of Open Sans are working good? Or am I overlooking some issue here, and do I have to insert the code you advised me about?
Some questions about your advice. To keep it simple for me let’s start with the first part about specify the font-weights for variable fonts (let’s talk about the fall-back option later…):
– The fact that the font is listed as “Open Sans ( font-family: open-sans ) normal: 400” in Custom Font Manager means that only the style 400 is available or working good? Is that why you recommend to specify the font-weights for variable fonts in a way that min and max values are included? The different font-weights are not included at all on greenconnections.nl now?
– Why do you recommend to upload the variable font with FTP instead of Custom Font Manager? What’s the difference?
Thanks a lot for all your help!
Best Wishes,
Alwin– Why do you advice to upload via ftp instead of via Custom Font Manager, what is the difference?
Hello Mike,
Great, I think I understand it now :)
Thanks for your great suport, the thopic can be closed now!
Best regards,
AlwinMike, thank you again for your fast and great support.
But… I am back at using the JS & CSS file merging and compression in the Enfold performance settings, and not using it in WP-Rocket, because after a lot of testing tis seems to be the best option after all.
Now, can you please answer me this (last) question:
With JS & CSS file merging and compression enabled in the Enfold performance settings, and JS & CSS file merging and compression disabled in WP-Rocket., do I have to enable or disable Delete old CSS and JS files in Enfold performnce settings?
Hello Mike,
Thank you. Is using a variable font the best thing to do nowdays? Or is there a risk involved? Does it work in all modern browsers?
September 11, 2022 at 5:14 pm in reply to: Delay Javascript Execution in WP-Rocket, font issues #1364616Hello Mike,
I have solved the issue by hosting my Google font Open Sans locally :)
Thanks for your help!
Best Wishes,
AlwinHello Mike,
I am getting more confused, sorry…
Okay, I am using Enfold and WP-Rocket, and therefore I have 2 options for JS & CSS file merging and compression:
– Option 1: I enable JS & CSS file merging and compression in the Enfold performance settings and disable JS & CSS file merging and compression in WP-Rocket.
– Option 2: I enable JS & CSS file merging and compression in WP-Rocket and disable it in Enfold performance settings.
Now with option 1, I need to disable or enable Delete old CSS and JS files in Enfold performnce settings?
And with option 2, disable or enable Delete old CSS and JS files in Enfold Performance settings?
Thanks,
AlwinThanks for expaling wehere the fallback fonts are coming from :)
I wil do some test with and without preloading entypo-fontello.
You can close this topic now,\.
Best Wishes,
AlwinSeptember 11, 2022 at 9:53 am in reply to: Delay Javascript Execution in WP-Rocket, font issues #1364594Hello Mike,
Thanlk you for your help!
However, this specific issue was not mentioned in my other threads. So what do you mean by “This should correct the issue”?
Maybe I overlooked something , it’s early and I need coffee :)
Thanks,
AlwinHello Mike,
Thank you for your hel!
When I disbale Enfold Theme Options ▸ Performance ▸ JS & CSS file merging and compression, and enable these options in WP-Rocket instaed, you say I have to enable Enfold Theme Options ▸ Performance ▸ Delete old CSS and JS files .
However, in the Enfold settings I read that you should not enable Enfold Theme Options ▸ Performance ▸ Delete old CSS and JS files when using a caching plugin.
Can you please explain why you say I have to enable Enfold Theme Options ▸ Performance ▸ Delete old CSS and JS files? Do I have to enable it once, save to delete the old CSS and JS files, and after that disable this option again, because I use a cache plugin?
This reply has been marked as private.Hello Yigit,
“Entypo-fontello are the default icon fonts used in Enfold”… haha, now I understand why this file is always loaded, and can’t be turned of :)
Has for the fallback fonts; you say these are Helvetica or Arial. But why these 2 fonts are fallback? Is that something that Google fonts sets up, or is it an Enfold setting that results in these 2 fonts being used as fallback?
In WP-Rocket I can preload wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.woff2
Do you think that is a good idea, or would it just slow down the first rendering of the site?Thanks,
AlwinNo problem Sozo :)
Thanks very much for your time and help!
Anyone else who can help me out here?
Alwin
Thanks again, however my simple questions are still not aswered:
– I don’t see anywhere the option to select for a prebuilt-in Enfold maintenance page. With both options comes a choice to choose on of my own build pages as maintenance page. Where is the (default) enfold prebuilt “maintenance mode” page where you are talking about?
– When my site is in maintenance mode and I visit my site I see the selected maintenance mode page in my browser. Why Does GTmetrix not see the see selected maintenance mode page? That is not logical for me.
– What is the difference between the 2 options “Use selected page content without redirect” and “Redirect to selected page”? Still can;’t find the answer to that question either, also not in the Enfold documentation.
Thank you for your reply Sozo! However I don’t understand anything about your answers, maybe you didn’t understand my questions correctly?
In maintenance mode, I don’t see anywhere the option to select for a prebuilt-in Enfold maintenance page. With both options comes a choice to choose your own page as maintenance page. Where is the (default) enfold prebuilt “maintenance mode” page where you are talking about? Maybe I’m looking over it and missing something?
Your explanation of the GTmettrix 503 error doesn’t sound entirely logical to me. Why can’t the server of GTmetrix and other similar tools open the maintenance page, while I can open the page in my browser?
Best Wishes,
AlwinYou can close the topic Rikard, thanks :)
Yes, thank you for your help Nikko!
best Wishes,
AlwinHello Nikko,
The issue is solved! I misunderstood your very first suggestion to replace all single quotes…
I replaced the single quotes again, but now I did it the correct way and everything is working fine now :)
That leaves me with the question: how is it possible that there was no issue at PHP 7.4 with the wrong single quotes in the code?
Thanks,
AlwinPHP 7.4 is working fine, but that was not the issue (the website is running 7.4 by default).
The issue is that I like to upgrade this site to PHP 8.0. I have tried PHP 8.1 also now (like you asked me to try) but that is causing the same issue: the frontend is running fine, but I am not able to login at WordPress anymore.
B
Kind regards,
AlwinHello Niko,
Oke, I replaced the code like you said, but it does not solve the issue.
Best Wishes,
AlwinHello Niko,
I replaced all single quotes, that didn’t help.
What do you mean with “try to replace after_setup_theme with init”? Change this line:
add_action( ‘after_setup_theme’, ‘ava_image_sizes’, 11 );
into this:
add_action( ‘init’, ‘ava_image_sizes’, 11 );
?By the way, I use the exact some code in functions.php on 2 other Enfold sites which are running fine with PHP 8.0.
Thanks,
AlwinYou can close the topic, thanks Rikard and Ismael!
-
AuthorPosts