A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/add below:

FontFaceSet: add() method - Web APIs

FontFaceSet: add() method

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.

Syntax Parameters
font

A FontFace to be added to the set.

Return value

A new FontFaceSet.

Exceptions
InvalidModificationError DOMException

Thrown if this font is already included via the CSS @font-face rule.

Examples

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