Let's take a look at the ones with no price tag, starting with the broader, more interesting choices for us, and for the scope of this book.
Even though the @font-face
rule was born with the CSS2 spec in 1998, it took almost ten years for browser makers to start supporting it – with real, widespread support coming not until a couple of years later.
That is why people usually see it as part of CSS3.
This solution requires you to personally own the license of the fonts you want to use – and to upload them to your server. Being based on self-hosting, it can add to your space and bandwidth fee quite quickly.
But there's an easy solution to that: subsetting.
Subsetting is the practical aspect in owning the fonts: you can take the original font file (usually a .ttf
or .otf
) and slim it down to only the characters that you need, deleting the unused ones.
This can be done with font editing software, such as the free FontForge or the ultra-famous FontLab...