manifest / performance / woda-two-stage-fonts-loader
Woda Two Stage Fonts Loader
This WordPress plugin provides a simple way for developers to implement a performant two stage font loading strategy.
by Woda · github.com/wwwoda/woda-two-stage-fonts-loader · website
★ 1stars
68krelease downloads
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/wwwoda/woda-two-stage-fonts-loader/releases/download/0.3.2/woda-two-stage-fonts-loader.zipDeclares an update source (https://github.com/wwwoda/woda-two-stage-fonts-loader), so updates arrive through the plugin's own updater.
From the readme
WordPress Plugin - Woda Two Stage Fonts Loader
High performance font loading technique
Installation
You can install the plugin by uploading it in the WordPress Admin or via composer.
If you installed the plugin via composer you will have to initialize it yourself to be able to use it. Add this to your theme's function file.
Configure
Pass the settings to the init function or hook into the supplied filter
How to use
If you are planning to use several weights of a font family you should decide which weight will be loaded in the first stage. This will be the weight all elements using the font family will display after the first stage has successfully loaded. Suffix these font families' name with Initial.
If a font family is used in only one weight you can load it in either stage with its regular name.
Stage 0
No custom font families have been loaded yet. At this stage every element should be styled with web safe fonts.
Stage 1
The font families from the first stage are successfully loaded now.
Stage 2
All custom font families have been loaded yet.
SCSS Mixin
Use a scss mixin for easier development.
Compiles to this
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| 0.3.2 | Mar 10, 2020 | woda-two-stage-fonts-loader.zip | 67,757 |