fontfaceobserver
unplugin-fonts
fontfaceobserver | unplugin-fonts | |
---|---|---|
6 | 1 | |
4,235 | 301 | |
- | 4.0% | |
1.6 | 5.3 | |
6 months ago | about 1 month ago | |
JavaScript | TypeScript | |
BSD 2-clause "Simplified" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fontfaceobserver
-
Strange Pixel Artifacts?
As for the flash of fallback fonts that occurs before the used google fonts are fully loaded (also known as FOUT or flash of unstyled text / type), one simple solution is to hide the root layout's content on init by wrapping everything in an element and hiding it or by displaying a "loading..." overlay. Then, all you have to do is detect when the webfonts are loaded, using something like FontFaceObserver, to reveal your app by updating the variable your wrapper's css class or the overlay element's display is bound to.
-
How to use self-hosted fonts face using NextJS?
✗ https://github.com/bramstein/fontfaceobserver 456 KB
-
Font loading strategies: FOIT and FOUT
Another method, though involves more code but can work across all browsers involve the use of an external library called FontFaceObserver. To make this work, you have to;
-
Font Loading with FontFace Observer - Getting Started
Github
-
Variable Fonts in Your Web Projects - Getting Started
I wrote about loading a variable font that uses FontFaceObserver. This can be used to optimize your font loading.
-
Can you specify a fallback font with a different font-style?
I am not familiar with ePUB but you could use something like FontFaceObserver to do this pretty easily:
unplugin-fonts
-
Best practices for loading fonts in Vue
If you are using vue with vite, take a look at https://github.com/stafyniaksacha/vite-plugin-fonts
What are some alternatives?
fontsource - Self-host Open Source fonts in neatly bundled NPM packages.
unplugin-vue-components - 📲 On-demand components auto importing for Vue
glyphhanger - Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
vite-plugin-pwa - Zero-config PWA for Vite
glyphhanger - Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
vite-plugin-webfont-dl - ⚡ Webfont Download Vite Plugin - Make your Vite site load faster
Hack - A typeface designed for source code
vue-cli-plugin-vite - Use vite today, with vue-cli.
MaterialDesign - ✒7000+ Material Design Icons from the Community
vike - 🔨 Like Next.js / Nuxt but as do-one-thing-do-it-well Vite plugin.
next-fonts - Import fonts in Next.js (supports woff, woff2, eot, ttf, otf & svg)
next-fonts-example - Examples for using https://www.npmjs.com/package/next-fonts