Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add {{AvailableInWorkers}} for CSS Font Loading API #36229

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions files/en-us/web/api/css_font_loading_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ page-type: web-api-overview
browser-compat: api.FontFace
---

{{DefaultAPISidebar("CSS Font Loading API")}}
{{DefaultAPISidebar("CSS Font Loading API")}}{{AvailableInWorkers}}

The CSS Font Loading API provides events and interfaces for dynamically loading font resources.

> [!NOTE]
> This feature is available in [Web Workers](/en-US/docs/Web/API/Web_Workers_API) (`self.fonts` provides access to {{domxref('FontFaceSet')}}).
The **CSS Font Loading API** provides events and interfaces for dynamically loading font resources.

## Concepts and usage

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/ascentoverride/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.ascentOverride
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`ascentOverride`** property of the {{domxref("FontFace")}} interface returns and sets the ascent metric for the font, the height above the baseline that CSS uses to lay out line boxes in an inline formatting context.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/descentoverride/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.descentOverride
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`descentOverride`** property of the {{domxref("FontFace")}} interface returns and sets the value of the {{cssxref("@font-face/descent-override")}} descriptor.
The possible values are `normal`, indicating that the metric used should be obtained from the font file, or a percentage.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/display/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.display
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`display`** property of the {{domxref("FontFace")}} interface determines how a font face is displayed based on whether and when it is downloaded and ready to use.
This property is equivalent to the CSS `font-display` descriptor.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/family/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.family
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`FontFace.family`** property allows the author to get or set the font family of a {{domxref("FontFace")}} object.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/featuresettings/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.featureSettings
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`featureSettings`** property of the {{domxref("FontFace")}} interface retrieves or sets infrequently used font features that are not available from a font's variant properties.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/fontface/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-constructor
browser-compat: api.FontFace.FontFace
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`FontFace()`** constructor creates a new {{domxref("FontFace")}} object.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.FontFace
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`FontFace`** interface of the [CSS Font Loading API](/en-US/docs/Web/API/CSS_Font_Loading_API) represents a single usable font face.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/linegapoverride/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.lineGapOverride
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`lineGapOverride`** property of the {{domxref("FontFace")}} interface returns and sets the value of the {{cssxref("@font-face/line-gap-override")}} descriptor.
The possible values are `normal`, indicating that the metric used should be obtained from the font file, or a percentage.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/load/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFace.load
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`load()`** method of the {{domxref("FontFace")}} interface requests and loads a font whose `source` was specified as a URL. It returns a {{jsxref('Promise')}} that resolves with the current `FontFace` object.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/loaded/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.loaded
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`loaded`** read-only property of the {{domxref("FontFace")}} interface returns a {{jsxref('Promise')}} that resolves with the current `FontFace` object when the font specified in the object's constructor is done loading or rejects with a `SyntaxError`.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/status/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.status
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`status`** read-only property of the {{domxref("FontFace")}} interface returns an enumerated value indicating the status of the font, one of `"unloaded"`, `"loading"`, `"loaded"`, or `"error"`.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/stretch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.stretch
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`stretch`** property of the {{domxref("FontFace")}} interface retrieves or sets how the font stretches.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/style/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.style
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`style`** property of the {{domxref("FontFace")}} interface retrieves or sets the font's style.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/unicoderange/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.unicodeRange
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`unicodeRange`** property of the {{domxref("FontFace")}} interface retrieves or sets the range of unicode code points encompassing the font.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/variant/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.FontFace.variant
---

{{APIRef("CSS Font Loading API")}}{{non-standard_header}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}{{non-standard_header}}

The **`variant`** property of the
{{domxref("FontFace")}} interface programmatically retrieves or sets font variant
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/variationsettings/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.FontFace.variationSettings
---

{{APIRef("CSS Font Loading API")}}{{SeeCompatTable}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}{{SeeCompatTable}}

The **`variationSettings`** property of the {{domxref("FontFace")}} interface retrieves or sets low-level OpenType or TrueType font variations.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontface/weight/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFace.weight
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`weight`** property of the {{domxref("FontFace")}} interface retrieves or sets the weight of the font.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/add/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.add
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`add()`** method of the {{domxref("FontFaceSet")}} interface adds a new font to the set.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/check/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.check
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The `check()` method of the {{domxref("FontFaceSet")}} returns `true` if you can render some text using the given font specification without attempting to use any fonts in this `FontFaceSet` that are not yet fully loaded. This means you can use the font specification without causing a [font swap](/en-US/docs/Web/CSS/@font-face/font-display).

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/clear/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.clear
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`clear()`** method of the {{domxref("FontFaceSet")}} interface removes all fonts added via this interface. Fonts added with the {{cssxref("@font-face")}} rule are not removed.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/delete/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.delete
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

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

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/entries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.entries
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`entries()`** method of the {{domxref("FontFaceSet")}} interface returns a new {{jsxref("Iterator")}} object, containing an array of `[value,value]` for each element in the `FontFaceSet`.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/foreach/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.forEach
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`forEach()`** method of the {{domxref("FontFaceSet")}} interface executes a provided function for each value in the `FontFaceSet` object.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/has/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.has
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`has()`** method of the {{domxref("FontFaceSet")}} interface returns a {{jsxref("Boolean")}} asserting whether an element is present with the given value.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.FontFaceSet
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`FontFaceSet`** interface of the [CSS Font Loading API](/en-US/docs/Web/API/CSS_Font_Loading_API) manages the loading of font-faces and querying of their download status.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/keys/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.keys
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`keys()`** method of the {{domxref("FontFaceSet")}} interface is an alias for {{domxref("FontFaceSet.values")}}.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/load/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.load
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The `load()` method of the {{domxref("FontFaceSet")}} forces all the fonts given in parameters to be loaded.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/loading_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.FontFaceSet.loading_event
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The `loading` event fires when the document begins loading fonts.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.FontFaceSet.loadingdone_event
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The `loadingdone` event fires when the document has loaded all fonts.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.FontFaceSet.loadingerror_event
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The `loadingerror` event fires when fonts have finished loading, but some or all fonts have failed to load.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/ready/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFaceSet.ready
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The `ready` read-only property of the {{domxref("FontFaceSet")}} interface returns a {{jsxref("Promise")}} that resolves to the given {{domxref("FontFaceSet")}}.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/size/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFaceSet.size
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`size`** property of the {{domxref("FontFaceSet")}} interface returns the number of items in the `FontFaceSet`.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/status/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFaceSet.status
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`status`** read-only property of the {{domxref("FontFaceSet")}} interface returns the loading state of the fonts in the set.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfaceset/values/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.FontFaceSet.values
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`values()`** method of the {{domxref("FontFaceSet")}} interface returns a new iterator object that yields the values for each element in the `FontFaceSet` object in insertion order.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.FontFaceSetLoadEvent.fontfaces
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`fontfaces`** read-only property of the
{{domxref("FontFaceSetLoadEvent")}} interface returns an array of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-constructor
browser-compat: api.FontFaceSetLoadEvent.FontFaceSetLoadEvent
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`FontFaceSetLoadEvent()`** constructor creates a new
{{domxref("FontFaceSetLoadEvent")}} object which is fired whenever a
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fontfacesetloadevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.FontFaceSetLoadEvent
---

{{APIRef("CSS Font Loading API")}}
{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The **`FontFaceSetLoadEvent`** interface of the [CSS Font Loading API](/en-US/docs/Web/API/CSS_Font_Loading_API) represents events fired at a {{domxref("FontFaceSet")}} after it starts loading font faces.

Expand Down