Use swap as font-display to Google Fonts on Elementor
Opened this issue · 0 comments
edpittol commented
Elementor uses the function the class Elementor\Frontend::enqueue_google_fonts
to enqueue the Google Fonts used on the website. It doesn't consider to use the font-display: swap
to display a system font while the webfont is loaded.
The challenge is develop an otimization inner Cwv_Perf_Optimize\Elementor
namespace to load Google Fonts on Elementor with font-display: swap
property.
How to reproduce
- Download Duplicator zip package and installer.php
- Clone the project
- Create the
public
directory on the root of the project - Make
public
directory writable:chmod 777 public/
- Move the Duplicator zip package and installer.php to public directory
- Up the server:
docker-compose up -d server
- Access Duplicator installer: https://localhost/installer.php
- Run the installation process. Use
db
as database password - Access admin to finish the process. The credentials are
admin / admin
- Access the homepage: https://localhost/
- Go to Network tab on Developer Tool and filter by
swap
- The list of request is empty
Expected
The Google Fonts request should be shown on request list when filtered by swap.