Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 928221 of FontFace

  • Revision slug: Web/API/FontFace
  • Revision title: FontFace
  • Revision id: 928221
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment WIP/Draft

Revision Content

{{APIRef}}{{SeeCompatTable}}

The FontFace interface

Constructor

{{domxref("FontFace.FontFace", "FontFace()")}}
 

Properties

This interface doesn't inherits any property.

{{domxref("FontFace.family")}}
Is a {{domxref("DOMString")}} containint the family of the font. It is equivalent of the {{cssxref("@font-face/family", "family")}} descriptor.
{{domxref("FontFace.style")}}
Is a {{domxref("DOMString")}} containint the style of the font. It is equivalent of the {{cssxref("@font-face/style", "style")}} descriptor.
{{domxref("FontFace.weight")}}
Is a {{domxref("DOMString")}} containint the weight of the font. It is equivalent of the {{cssxref("@font-face/weight", "weight")}} descriptor.
{{domxref("FontFace.stretch")}}
Is a {{domxref("DOMString")}} containint how the font stretches. It is equivalent of the {{cssxref("@font-face/stretch", "stretch")}} descriptor.
{{domxref("FontFace.unicodeRange")}}
Is a {{domxref("DOMString")}} containint the range of code contained in the font. It is equivalent of the {{cssxref("@font-face/unicode-range", "unicode-range")}} descriptor.
{{domxref("FontFace.variant")}}
Is a {{domxref("DOMString")}} containint the variant of the font. It is equivalent of the {{cssxref("@font-face/range", "range")}} descriptor.
{{domxref("FontFace.featureSettings")}}
Is a {{domxref("DOMString")}} containint the features of the font. It is equivalent of the {{cssxref("@font-face/feature-settings", "feature-settings")}} descriptor.
{{domxref("FontFace.status")}} {{readonlyinline}}
Returns an enumerated value indicating the status of the font. It can be one of the following: "unloaded", "loading", "loaded", or "error".
{{domxref("FontFace.loaded")}} {{readonlyinline}}
Returning a {{domxref("Promise")}} of a FontFace that fulfills when the font is completely loaded and rejects when an error happens.

Methods

This interface doesn't inherits any method.

{{domxref("FontFace.load()")}}
Loads the font, returning a {{domxref("Promise")}} of a FontFace that fulfills when the font is completely loaded and rejects when an error happens.

Revision Source

<p>{{APIRef}}{{SeeCompatTable}}</p>

<p>The <code><strong>FontFace</strong></code> interface</p>

<h2>Constructor</h2>

<dl>
 <dt>{{domxref("FontFace.FontFace", "FontFace()")}}</dt>
 <dd>&nbsp;</dd>
</dl>

<h2>Properties</h2>

<p><em>This interface doesn't inherits any property.</em></p>

<dl>
 <dt>{{domxref("FontFace.family")}}</dt>
 <dd>Is a {{domxref("DOMString")}} containint the <em>family</em> of the font. It is equivalent of the {{cssxref("@font-face/family", "family")}} descriptor.</dd>
 <dt>{{domxref("FontFace.style")}}</dt>
 <dd>Is a {{domxref("DOMString")}} containint the <em>style</em> of the font. It is equivalent of the {{cssxref("@font-face/style", "style")}} descriptor.</dd>
 <dt>{{domxref("FontFace.weight")}}</dt>
 <dd>Is a {{domxref("DOMString")}} containint the <em>weight</em> of the font. It is equivalent of the {{cssxref("@font-face/weight", "weight")}} descriptor.</dd>
 <dt>{{domxref("FontFace.stretch")}}</dt>
 <dd>Is a {{domxref("DOMString")}} containint how the font <em>stretches</em>. It is equivalent of the {{cssxref("@font-face/stretch", "stretch")}} descriptor.</dd>
 <dt>{{domxref("FontFace.unicodeRange")}}</dt>
 <dd>Is a {{domxref("DOMString")}} containint the <em>range of code</em> contained in the font. It is equivalent of the {{cssxref("@font-face/unicode-range", "unicode-range")}} descriptor.</dd>
 <dt>{{domxref("FontFace.variant")}}</dt>
 <dd>Is a {{domxref("DOMString")}} containint the <em>variant</em> of the font. It is equivalent of the {{cssxref("@font-face/range", "range")}} descriptor.</dd>
 <dt>{{domxref("FontFace.featureSettings")}}</dt>
 <dd>Is a {{domxref("DOMString")}} containint the <em>features</em> of the font. It is equivalent of the {{cssxref("@font-face/feature-settings", "feature-settings")}} descriptor.</dd>
 <dt>{{domxref("FontFace.status")}} {{readonlyinline}}</dt>
 <dd>Returns an enumerated value indicating the status of the font. It can be one of the following: <code>"unloaded"</code>, <code>"loading"</code>, <code>"loaded"</code>, or <code>"error"</code>.</dd>
 <dt>{{domxref("FontFace.loaded")}} {{readonlyinline}}</dt>
 <dd>Returning a {{domxref("Promise")}} of a <code>FontFace</code> that fulfills when the font is completely loaded and rejects when an error happens.</dd>
</dl>

<h2>Methods</h2>

<p><em>This interface doesn't inherits any method.</em></p>

<dl>
 <dt>{{domxref("FontFace.load()")}}</dt>
 <dd>Loads the font, returning a {{domxref("Promise")}} of a <code>FontFace</code> that fulfills when the font is completely loaded and rejects when an error happens.</dd>
</dl>
Revert to this revision