Baseline Widely available
Note: This feature is available in Web Workers.
The add()
method of the FontFaceSet
interface adds a new font to the set.
font
A FontFace
to be added to the set.
A new FontFaceSet
.
InvalidModificationError
DOMException
Thrown if this font is already included via the CSS @font-face
rule.
In the following example a new FontFace
object is created and then added to the FontFaceSet
.
const font = new FontFace("MyFont", 'url("myFont.woff2")');
document.fonts.add(font);
Specifications Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4