I'm using the font-family Bitter!
I'm using the font-family Oxygen!
Available in Chrome 48+ | View on GitHub | Browse Samples
FontFaceSet
is an interface defined as part of the
CSS Font Loading API.
It's used to load font faces, and check the status of previously requested fonts. The
FontFaceSet
interface for the current HTML page is available in JavaScript as
document.fonts
.
The sample illustrates constructing FontFace
objects and explicitly adding them to
the page's document.fonts
FontFaceSet
, which is an alternative to the
more traditional approach of using CSS's
@font-face
rule. It uses the
FontFace.loaded
promise to keep track of when each individual font has been loaded.
The sample also shows off the newer
Set
-like
functionality in FontFaceSet
, by iterating over document.fonts.values()
once all the fonts are loaded, and displaying information about each FontFace
.
I'm using the font-family Bitter!
I'm using the font-family Oxygen!