The page loads a webfont (Jetbrains Mono) with 4 different weights, for a total payload of 725KB. Looking light and being light are 2 different things.
The problem is mostly with how fonts are packaged, because even if you serve WOFF and WOFF2 in addition to fallbacks like TTF, then the font will most likely include a whole bunch of symbols that you won’t actually display.
Sadly, I never quite figured out how to do it for arbitrary fonts easily, so for example I still serve comparatively large PT Sans, PT Serif and PT Mono fonts just because I like how they look. Maybe some day I’ll figure it out and will be able to automate converting all of the fonts I want.
Here’s something silly: you could probably put GNU Unifont on some page, the OpenType version of which is like 5 MB alone: https://unifoundry.com/unifont/
All that said, the JetBrains Mono font is a pleasure to look at on the site, as long as I’m not on a limited data cap.
- those fonts will have different sizes (not guaranteed to be metrically compatible), which would make working with UI harder
- sometimes the built in fonts look pretty unpleasant (Courier New, anyone?)
- it will look different on every OS, which in most cases will also complicate testing and hurt branding (in actual projects)
I think the world would be a better place instead, if all of the OS makers got together and were like: "Okay, everyone needs fonts, let's just take the 20 most popular serif, sans serif and monospaced fonts with open licenses and include them in our OS default font stack, so they can be used in all the sites, without costing humanity PB of data transfer because we couldn't be bothered to include like 100 MB of additional content in our OSes."
Instead, nobody cares and the only options we have are to either use the crappy web safe fonts, or waste bandwidth to make websites look better. Luckily, if you prefer the former approach, then you can untick "Allow pages to choose their own fonts, instead of your selections above" in Firefox options or the equivalent in other browsers.