A simple @font-face
example
This entire collection of demos uses @font-face
, but this is a contained example.
Using @font-face
with Abhaya Libre
This font family is Abhaya Libre from Mooniak, a Colombo, Sri Lanka-based design collective. You will see it used again in the unicode-range
demo.
We've used the Abhaya Libre Extra Bold face for the heading, Abhaya Libre Regular for paragraph text, and Abhaya Libre Bold for emphasized text (<em>
). Notice in that this example, we need to use a separate font file for each weight or style — three in total.
With variable fonts, that's no longer the case.