fontsource
fontfaceobserver
Our great sponsors
fontsource | fontfaceobserver | |
---|---|---|
40 | 6 | |
4,564 | 4,235 | |
3.0% | - | |
9.1 | 1.6 | |
7 days ago | 6 months ago | |
TypeScript | JavaScript | |
MIT License | BSD 2-clause "Simplified" 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.
fontsource
-
Variable Fonts
Fontsource[0] is also an easy way to self-host variable fonts via NPM packages.
[0] https://fontsource.org/?variable=true
- Fontsource
-
Ask HN: What side projects landed you a job?
A few years ago, while I was still in high school, I began learning how to create websites purely for fun. One thing I found to be tedious was self-hosting fonts, with existing solutions to improve it completely abandoned. Consequently, I decided to learn a bit more about JavaScript by rewriting and improving these abandoned projects which led to the creation of Fontsource[0].
This project has undoubtedly set of a series of impactful events in my life, and I attribute many of my successes to it. I've had opportunities to network with numerous amazing engineers through it, leading to a part-time role and multiple internships. Companies that approached me for support also wanted to keep in touch! I also graduate this year and I am going with a full-time role from one of the aforementioned internships.
While I acknowledge my circumstances are extremely fortunate, I genuinely believe that having open source projects early on in your career can significantly contribute to standing out as a developer.
[0] https://fontsource.org
- Font Source – a privacy-friendly Google Fonts alternative
-
The new Google Fonts: find what you’re looking for
Tip: more privacy friendly Google alternatives are available and super easy to use: https://fontsource.org/
I switched most of my sites to use it and I’ve been quite happy so far.
No need to leak data to Google.
For weirder stuff (e.g. https://tidings.potato.horse) I use sites like dafont.com and convert fonts using Font Squirrel.
-
justFoundOutGoogleFontsCollectsUserIPs
Fontsource publishes all Google Fonts fonts as NPM packages, allowing you to easily import them with modern bundlers.
-
Just launched my first svelte project! An opensource alternative to Google Fonts, with a focus on variable fonts. Coming from a React background Svelte has been absolutely amazing to work with.
I personally like using FontSource for this, they have some extra fonts beyond Google Fonts too
-
Using Fontsource With 11ty
I stumbled upon fontsource.org the other day and I found the idea of installing fonts from npm packages appealing.
-
Adding locally hosted Google fonts to your SvelteKit project
To do this with SvelteKit, you can use the Fontsource project. They host all of the Google Fonts catalogue as NPM packages.
- Self-host Open Source fonts in neatly bundled NPM packages
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:
What are some alternatives?
Google Fonts - Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
unplugin-fonts - Universal Webfont loader - Unfonts - based on https://web.dev/optimize-webfont-loading/
juliamono - repository for JuliaMono, a monospaced font with reasonable Unicode support.
glyphhanger - Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
netlify-menubar - Netlify menubar app to receive build information or trigger new builds
glyphhanger - Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
leerob.io - ✨ My portfolio built with Next.js, Tailwind, and Vercel.
Hack - A typeface designed for source code
MeetingBar - 🇺🇦 Your meetings at your fingertips in the macOS menu bar
MaterialDesign - ✒7000+ Material Design Icons from the Community
parse-xml - A fast, safe, compliant XML parser for Node.js and browsers.
next-fonts - Import fonts in Next.js (supports woff, woff2, eot, ttf, otf & svg)