Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons Font Display Swap #10095

Closed
2 tasks done
jonathansoltero opened this issue Jan 8, 2020 · 41 comments
Closed
2 tasks done

Icons Font Display Swap #10095

jonathansoltero opened this issue Jan 8, 2020 · 41 comments
Labels
request/enhancement Indicates an Enhancement Request for an existing feature. type/performance Indicates when a topic is related to Performance.

Comments

@jonathansoltero
Copy link

jonathansoltero commented Jan 8, 2020

Prerequisites

  • I have searched for similar features requests in both open and closed tickets and cannot find a duplicate.
  • The feature is still missing in the latest stable version of Elementor ( Elementor Pro. )

What problem is your feature request going to solve? Please describe.
PageSpeed Insights "Ensure text remains visible during webfont load" Fonts being loaded by Elementor such as the icons are causing a 1-second delay in load time.

I am not referring to custom fonts from Elementer Pro, I am referring to the bundled icons/fonts with Elementor, paths such as:

/elem/assets/lib/font-awesome/webfonts/fa-solid-900.woff2
/elem/assets/lib/eicons/fonts/eicons.woff2?5.5.0

Describe the solution you'd like
Adding font-display: swap;

Update: Font Awesome did this themselves, just update to the latest version 5.15

Describe alternatives you've considered
I have added the code in myself but they were removed after the update. I don't want to keep manually adding the font display.

Additional context
Add any other context or screenshots about the feature request here.

@stannvanheusden
Copy link

I second this. Not only for internal fonts: also for Google Fonts, TypeKit etc.

@jdub850000
Copy link

Thirded!

@dineshmistry
Copy link

Fourth!

jankohoener pushed a commit to jankohoener/elementor that referenced this issue Apr 2, 2020
add font-display: swap to Font Awesome; improves site score in Google Page Speed Insights (see also: https://web.dev/font-display/ and issue elementor#10095)
@draconnia
Copy link

On the one hand Lighthouse tells us to use font-display: swap and delays the load
On the other hand, we are told that font-display: swap is not ideal for an icon font, because there's no benefit in showing the character in a fallback typeface.
What can we do?

@jonathansoltero jonathansoltero mentioned this issue Jul 24, 2020
2 tasks
@visrey
Copy link

visrey commented Oct 5, 2020

I think this issue is fixed in the latest release of font awesome refer the ticket

FortAwesome/Font-Awesome#16077

Upgrading the font-awesome version to 5.13 should fix the issue.

@jonathansoltero
Copy link
Author

I think this issue is fixed in the latest release of font awesome refer the ticket

FortAwesome/Font-Awesome#16077

Upgrading the font-awesome version to 5.13 should fix the issue.

What version is Elementor on now?

@jonathansoltero
Copy link
Author

jonathansoltero commented Oct 29, 2020

Can we also consider adding <link rel=preload>

@visrey
Copy link

visrey commented Oct 30, 2020

Screenshot 2020-10-30 at 7 54 02 PM

I have replaced the copies locally in my wordpress with version 5.13 copies and it worked 👍

@shaneonabike
Copy link

Also there is already a hook for this so we simply need to append display=swap or whatever setting we wish and Google creates the appropriate css. I attempted to override the existing stylesheet but it seems to never make it in the enqueue even when I set my priority super low :/

Please this would be a super easy change to hook into your existing filter created for local fonts.

@visrey
Copy link

visrey commented Nov 15, 2020

It won't work the way you think display=swap won't work for font-awesome.
Understand the issue with font-awesome before suggesting the solution.
Actual issue and solution can be found in the issue created at font-awesome
FortAwesome/Font-Awesome#16077

Issue is because of font-awesome not with elementor.

@shaneonabike
Copy link

I saw that there were other comments relating to this being added for Google fonts too so that's why I added my comment. Maybe could I suggest you change the ticket title so that it's more clear that it relates to icons? Or just Font Awesome. Cause really it's not solved and the title implies more of a global (applies to all not covered) approach?

@jonathansoltero jonathansoltero changed the title Font Display Swap Icons Font Display Swap Nov 16, 2020
@jonathansoltero
Copy link
Author

I saw that there were other comments relating to this being added for Google fonts too so that's why I added my comment. Maybe could I suggest you change the ticket title so that it's more clear that it relates to icons? Or just Font Awesome. Cause really it's not solved and the title implies more of a global (applies to all not covered) approach?

There I have added Icons to the title, like visrey said, Font Awesome has already done the updates to make lighthouse happy, Elementor just needs to stay up to date, Font Awesome resolved this in March.

@DorShahar DorShahar added the request/feature Indicates a Request for a non-existing New Feature. label Feb 14, 2021
@shilo-ey shilo-ey added request/enhancement Indicates an Enhancement Request for an existing feature. type/performance Indicates when a topic is related to Performance. and removed request/feature Indicates a Request for a non-existing New Feature. labels Mar 14, 2021
@shilo-ey
Copy link
Contributor

This feature has been released in Elementor v3.1.

Please feel free to update

@joshcummingsdesign
Copy link

joshcummingsdesign commented Apr 15, 2021

This issue still exists for Elementor icons.

Running Lighthouse shows the following:

Ensure text remains visible during webfont load
../fonts/eicons.woff2?5.11.0

Confirmed that adding font-display: swap to the @font-face rule in elementor-icons.css resolves the issue. Happy to make a PR if this is a valid solution.

@pavosdijital
Copy link

This issue still exists for Elementor icons.

Running Lighthouse shows the following:

Ensure text remains visible during webfont load
../fonts/eicons.woff2?5.11.0

Confirmed that adding font-display: swap to the @font-face rule in elementor-icons.css resolves the issue. Happy to make a PR if this is a valid solution.

Can you please write the code exactly how it should be so I can add to my website. I am not very familiar with coding so your help is most appreciated. thank you

@berkmh
Copy link

berkmh commented May 6, 2021

This issue still exists for Elementor icons.
Running Lighthouse shows the following:

Ensure text remains visible during webfont load
../fonts/eicons.woff2?5.11.0

Confirmed that adding font-display: swap to the @font-face rule in elementor-icons.css resolves the issue. Happy to make a PR if this is a valid solution.

Can you please write the code exactly how it should be so I can add to my website. I am not very familiar with coding so your help is most appreciated. thank you

need same

@JennyPower
Copy link

Confirmed still an issue

@Holland1
Copy link

Indeed, still an issue. Hope this will be fixed soon

@joshcummingsdesign
Copy link

I created #15014 to resolve this issue.

@jkplkjm
Copy link

jkplkjm commented Jun 3, 2021

I created #15014 to resolve this issue.

I tried this directly modifying the css and .min.css files under wp-content/plugins/elementor/assets/lib/eicons/css/ however, it didn't work. I'm not entirely sure why, but my browser is requesting the .woff2 icons with query parameter ?5.10.0 instead of ?5.11.0, and it doesn't work even when adding the new urls.

@yerba69
Copy link

yerba69 commented Jun 11, 2021

I created #15014 to resolve this issue.

I tried this directly modifying the css and .min.css files under wp-content/plugins/elementor/assets/lib/eicons/css/ however, it didn't work. I'm not entirely sure why, but my browser is requesting the .woff2 icons with query parameter ?5.10.0 instead of ?5.11.0, and it doesn't work even when adding the new urls.

I'm having the same issue on my end.

@jonathansoltero
Copy link
Author

I created #15014 to resolve this issue.

I tried this directly modifying the css and .min.css files under wp-content/plugins/elementor/assets/lib/eicons/css/ however, it didn't work. I'm not entirely sure why, but my browser is requesting the .woff2 icons with query parameter ?5.10.0 instead of ?5.11.0, and it doesn't work even when adding the new URLs.

           Yeah same here, it seems to only show up for mobile

@jonathansoltero
Copy link
Author

Nevermind it looks like it's also affecting desktop

@StiefTschobbs
Copy link

It affects desktop and mobile for my website.. all changes on the .css & min.css do not change anything.. so how could we tackle that issue?

@Hynek-O
Copy link

Hynek-O commented Jul 7, 2021

Confirmed still an issue.

@Salimoh
Copy link

Salimoh commented Aug 25, 2021

Still getting this error on PSI for elementor 3.4

@oliveandlake
Copy link

Yes, also still getting this error. Seems to be no way to remove eicons.

@shilo-ey
Copy link
Contributor

shilo-ey commented Sep 5, 2021

We are planning on releasing a new e-icons loading method that will eliminate this issue (inline SVG)

Thanks

@rafaviana
Copy link

We are planning on releasing a new e-icons loading method that will eliminate this issue (inline SVG)

Thanks

Great news! Looking for it 😉

@boobo94
Copy link

boobo94 commented Oct 22, 2021

any updates on this? Thanks

@EXECdesign
Copy link

#15897
Still the same issues in EP 3.5.1: eicons.woff2?5.10.0 gets loaded, Google Lighthouse test fails.

@llavillaccama
Copy link

Same problem someone managed to fix it

@alibori
Copy link

alibori commented Dec 3, 2021

Hello!
Same problem with eicons on Page Speed Insights.

@jonathansoltero
Copy link
Author

Yeah still not fixed.

@yerba69
Copy link

yerba69 commented Dec 16, 2021 via email

@Salimoh
Copy link

Salimoh commented Dec 18, 2021

Does anybody else have problem with the cart icon after this update?
Cart icon no longer show in my client website
screenshot is here

@yerba69
Copy link

yerba69 commented Dec 18, 2021 via email

@EXECdesign
Copy link

EXECdesign commented Dec 20, 2021

This is what I get by testing Elementor 3.5.0:
wp582-ep352-ep350-php80

It's a very slim site with WP 5.8.2 and EP 3.5.2 running with PHP 8.0.13.
After rollback to Elementor 3.4.8 everything works fine again instantly (Edit: Font Awesome Inline ACTIVE).

What can be so difficult regarding those Eicons that there's another trouble about it update after update?

@tamal-sen
Copy link

Hope the fix will be implemented soon. I have tried the Inline SVG method which is currently in alpha stage. That messed up my fonts so I had to revert.

@asfo
Copy link

asfo commented Jun 17, 2023

So, this was closed but not fixed? I mean I'm posting this on June 17, 2023 and the issue is still there ...any workaround here?

@JanWebofka
Copy link

Hello,

/wp-content/plugins/elementor/assets/lib/eicons/fonts/eicons.woff2?5.23.0

still issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request/enhancement Indicates an Enhancement Request for an existing feature. type/performance Indicates when a topic is related to Performance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.