GO-V.ORG
As seen in

FontFaceSet: delete() method

CSS Font Loading API

CSS Font Loading API

The **`delete()`** method of the FontFaceSet interface removes a font from the set.

Font faces that were added to the set using the CSS @font-face rule remain connected to the corresponding CSS, and cannot be deleted.

## Syntax

```js-nolint
delete(font)
```

### Parameters

- `font`
- : A FontFace to be removed from the set.

### Return value

A boolean value which is `true` if the deletion was successful, and `false` otherwise.

## Examples

In the following example a new FontFace object is created and then deleted from the FontFaceSet.

```js
const font = new FontFace("MyFont", 'url("myFont.woff2")');
document.fonts.delete(font);
```

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"FontFaceSet: delete() method". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/delete

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·