
This plugin implements and automates Zach Leatherman’s “Critical FOFT with preload, with a polyfill fallback emulating font-display: optional” to optimize and speed up web font loading and improve UX by minimizing Flash of Invisible Text, Flash of Unstyled Text, and DOM Reflow. See https://github.com/zachleat/web-font-loading-recipes#the-compromise-critical-foft-with-preload-with-a-polyfill-fallback-emulating-font-display-optional.
This plugin is based on Hugh Lashbrooke’s Starter Plugin, a robust and GPL-licensed code template for creating a standards-compliant WordPress plugin.
Episode 1. Intro and Background
Episode 2. Font Squirrel Generator (WOFF & WOFF2)
Upload two files for each web font: a WOFF file and a WOFF2 file. We recommend you use Font Squirrel’s Webfont Generator to generate the files. Mandatory Font Squirrel settings are:
Select “Expert” Font Formats: “WOFF” “WOFF2” Advanced Options: “Font Name Suffix” = -webfont
For detailed recommended settings, see the plugin Upload options screen.
Filenames must follow the proper naming convention: $family–$variant-webfont.$filetype.
Example: for the bold weight italic style of Times New Roman, rename the files to timesnewroman-boldItalic-webfont.woff and timesnewroman-boldItalic-webfont.woff2.
Allowed weights and styles and their CSS mappings are:
regular | normal (maps to 400)
italic (maps to 400)
boldItalic (maps to 700)
For small-caps support and extended font-weight support, please upgrade to WP FOFT Loader PRO.
This plugin supports 1 – 4 font families. For example, you might have a display font for headings, a serif-font for body text, a sans-serif font for UI elements, such as navigation labels, and a monospaced font for tabular data and code examples.
Upload up to 4 small, subsetted fonts. For each font, upload a WOFF & WOFF2 file (for a total of up to 8 files). Each font will act as a placeholder until the full fonts load.
Filenames must follow the proper naming convention: $family-optimized.$filetype.
Example: If you uploaded timesnewroman-regular-webfont.woff and timesnewroman-regular-webfont.woff2 as your body font on the previous screen, name the subsetted versions timesnewroman-optimized.woff and timesnewroman-optimized.woff2 respectively.
To subset and encode your fonts, we recommend you use Font Squirrel’s Webfont Generator. Mandatory Font Squirrel settings are:
Select “Expert” Font Formats: “WOFF” “WOFF2” Fix Missing Glyphs: None Subsetting: “Custom Subsetting” with the Unicode Ranges 0065-0041-005A,0061-007A Leave everything else unchecked OpenType Features: None OpenType Flattening: None CSS: Leave unchecked Advanced Options: “Font Name Suffix” = -optimized
For detailed recommended settings, see the plugin Subset options screen.
@import rules are automatically handled by this plugin. You may manually inline your font-related CSS in the document <head> here. Place rules pertaining only to the font-family, font-weight, font-style, and font-variation properties here.
The plugin loads some CSS by default. You may disable it from this screen.
The plugin uses font-display: swap by default. You can override the font-display property here.
Declarations placed in this field will load subsetted fonts as placeholders while the full fonts load.
See the Documentation screen to view the Stage 1 CSS that this plugin loads by default.
Incorrect:
.nav-primary { // Missing class: .fonts-stage-1 font-family: latoSubset, sans-serif; } .fonts-stage-1 #footer-secondary { font-family: lato, san-serif; // Missing “Subset” suffix } .fonts-stage-1 div.callout { font-family: latoSubset, san-serif; font-size: 1rem; // “font-family,” “font-weight,” “font-style,” // and “font-variant” rules only } .fonts-stage-1 div.callout { font-family: latosubset, san-serif; // “Subset” suffix is case-sensitive } Correct:
.fonts-stage-1 .nav-primary { font-family: latoSubset, sans-serif; } See the Documentation screen to view the Stage 2 CSS that this plugin loads by default.
Incorrect:
tbody { // Missing class: .fonts-stage-2 font-family: lato, Corbel, "Lucida Grande", sans-serif; font-weight: 400; font-style: normal; } .fonts-stage-2 span.bolder { font-family: lato-bold, Corbel, "Lucida Grande", sans-serif; // Don’t include style in font name. // Better yet, omit declaration altogether. font-weight: 700; } .fonts-stage-2 div.callout { font-family: lato-regular, Corbel, "Lucida Grande", san-serif; font-size: 1rem; // “font-family,” “font-weight,” “font-style,” // and “font-variant” rules only } Correct:
.fonts-stage-2 div.callout { font-family: lato, Corbel, "Lucida Grande", sans-serif; font-weight: 400; font-style: normal; } .fonts-stage-2 div.callout { // No need to redeclare the font-family — all weights map to a single family name font-weight: 700; // This will use the lato-bold font } For best performance, please minify your CSS before pasting it into the form.
Change the default font fallbacks in case your custom fonts don’t load. Don’t include the names of your default custom fonts here.
See the Documentation screen to view the CSS this plugin loads by default and to view video tutorials.
Would you like to help translate WP FOFT Loader into your own language? You can do that here!
This plugin includes these third-party libraries in its package.
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
Chris J. Zähller
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Add interactive stories to your site to showcase content in a visual, mobile friendly format that boosts engagement and guides visitors toward action.
Add a no-code music player to your site to stream audio, share playlists, and support multiple formats with easy setup.
Use a notification bar to alert users, highlight offers, and drive clicks that boost engagement, signups, and conversions.
Show progress with animated progress circles that visualize goals, display achievements, and keep visitors engaged.
Add WhatsApp Chat to your site to communicate with visitors, deliver instant support, and create a smoother, more trustworthy user experience.
Make it easy for supporters to contribute using PayPal or Stripe by adding a donation button that keeps giving fast, secure, and on site.
Show Etsy reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.
Create real estate listings with a listings widget that displays properties clearly, supports customization, and helps visitors explore homes more easily.
Display a cookies consent bar that explains usage and supports GDPR compliance, enhancing user trust and legal clarity.
Use a scroll progress bar that visually tracks reading on the page, improves navigation, and keeps visitors aware of their position.
Show trust badges that highlight security and reliability, build customer confidence, and help visitors feel safe making purchases on your site.
Create and customize product catalogs with a catalog widget that organizes items clearly, improves browsing, and helps visitors explore your offerings easily.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
