A lightweight JavaScript library for monitoring web font loading using scroll events.
Font Face Observer is a lightweight JavaScript library that monitors when web fonts are loaded on a webpage. It solves the problem of knowing when fonts are available so developers can control rendering behavior, like avoiding flash of unstyled text (FOUT). It works with any font service or self-hosted fonts and uses efficient scroll-based detection.
Frontend developers and web designers who need precise control over font loading behavior to improve performance and user experience on websites using custom typography.
Developers choose Font Face Observer because it's significantly smaller and less intrusive than alternatives like Web Font Loader, uses efficient scroll events for detection, and provides a simple Promise-based API without locking them into specific font services or loading strategies.
Webfont loading. Simple, small, and efficient.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At only 3.5KB minified (1.3KB gzipped), it adds minimal overhead, making it ideal for performance-critical websites as highlighted in the README.
Uses scroll events for font load monitoring, which is less resource-intensive than alternatives like Web Font Loader, ensuring compatibility from IE8+.
Provides a simple .load() method returning Promises, enabling straightforward async handling and integration with modern JavaScript patterns.
Works with any font service or self-hosted fonts, giving developers full flexibility over font sources without restrictions.
Requires creating separate FontFaceObserver instances for each font family and variation, which can be cumbersome in projects with many fonts.
For older browsers without native Promise support, an extra polyfill is needed, adding roughly 1.4KB to the file size as noted in the installation section.
Only offers timeout control; lacks advanced features like automatic font-display swapping or comprehensive error handling, requiring custom implementation.
Font Face Observer is an open-source alternative to the following products: