Liking cljdoc? Tell your friends :D

web.fonts.FontFace

The FontFace interface represents a single usable font face. allows control of the source of the font face, being a URL to external resource, or a buffer; it also allows control of when font face is loaded and its current status.

The FontFace interface represents a single usable font face.
allows control of the source of the font face, being a URL to
external resource, or a buffer; it also allows control of when
font face is loaded and its current status.
raw docstring

constructorcljs

(constructor & args)

Constructor.

The FontFace() constructor creates a new web.fonts.FontFace object.

family Specifies a name that will be used as the font face value for font properties. Takes the same type of values as the font-family descriptor of @font-face . source The font source. This can be either:

A URL Binary font data

descriptors Optional A set of optional descriptors passed as an object. It can have the following keys:

family: Family style: Style weight: Weight stretch: Stretch unicodeRange: Unicode range variant: variant featureSettings: Feature settings

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace

Constructor.

The FontFace() constructor creates a new `web.fonts.FontFace` object.

family
Specifies a name that will be used as the font face value for font properties. Takes the same type of values as the `font-family` descriptor of `@font-face` .
source
The font source. This can be either:

A URL
Binary font data


descriptors Optional
A set of optional descriptors passed as an object. It can have the following keys:

family: Family
style: Style
weight: Weight
stretch: Stretch
unicodeRange: Unicode range
variant: variant
featureSettings: Feature settings

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace`
sourceraw docstring

displaycljs

(display this)

Property.

[Experimental]

The display property of the web.fonts.FontFace interface determines a font face is displayed based on whether and when it is downloaded ready to use. This property is equivalent to the CSS font-display

var display = FontFace.display FontFace.display = display

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display

Property.

[Experimental]

The display property of the `web.fonts.FontFace` interface determines
a font face is displayed based on whether and when it is downloaded
ready to use. This property is equivalent to the CSS font-display

`var display = FontFace.display
FontFace.display = display`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display`
sourceraw docstring

familycljs

(family this)

Property.

[Draft] [Experimental]

The FontFace.family property allows the author to get or set font family of a web.fonts.FontFace object. This is equivalent the font-family descriptor of @font-face.

instanceOfFontFace.family = 'font family name'; var fontFace = instanceOfFontFace.family; // \"font family name\"

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family

Property.

[Draft]
[Experimental]

The FontFace.family property allows the author to get or set
font family of a `web.fonts.FontFace` object. This is equivalent
the `font-family` descriptor of `@font-face`.

`instanceOfFontFace.family = 'font family name';
var fontFace = instanceOfFontFace.family; // \"font family name\"`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family`
sourceraw docstring

feature-settingscljs

(feature-settings this)

Property.

[Draft] [Experimental]

The featureSettings property of the web.fonts.FontFace interface or sets infrequently used font features that are not available a font's variant properties. It is equivalent to the font-feature-settings

var featureSettingDescriptor = FontFace.featureSettings; FontFace.featureSettings = featureSettingDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings

Property.

[Draft]
[Experimental]

The featureSettings property of the `web.fonts.FontFace` interface
or sets infrequently used font features that are not available
a font's variant properties. It is equivalent to the `font-feature-settings`

`var featureSettingDescriptor = FontFace.featureSettings;
FontFace.featureSettings = featureSettingDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings`
sourceraw docstring

loadcljs

(load this)

Method.

[Draft] [Experimental]

The load() method of the web.fonts.FontFace interface loads font based on current object's constructor-passed requirements, a location or source buffer, and returns a js.Promise that with the current FontFace object.

var promise = FontFace.load();

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/load

Method.

[Draft]
[Experimental]

The load() method of the `web.fonts.FontFace` interface loads
font based on current object's constructor-passed requirements,
a location or source buffer, and returns a `js.Promise` that
with the current FontFace object.

`var promise = FontFace.load();`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/load`
sourceraw docstring

loadedcljs

(loaded this)

Property.

[Read Only] [Draft] [Experimental]

The loaded read-only property of the web.fonts.FontFace interface a js.Promise that resolves with the current FontFace object the font specified in the object's constructor is done loading rejects with a SyntaxError.

var aPromise = FontFace.loaded;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/loaded

Property.

[Read Only]
[Draft]
[Experimental]

The loaded read-only property of the `web.fonts.FontFace` interface
a `js.Promise` that resolves with the current FontFace object
the font specified in the object's constructor is done loading
rejects with a SyntaxError.

`var aPromise = FontFace.loaded;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/loaded`
sourceraw docstring

set-display!cljs

(set-display! this val)

Property.

[Experimental]

The display property of the web.fonts.FontFace interface determines a font face is displayed based on whether and when it is downloaded ready to use. This property is equivalent to the CSS font-display

var display = FontFace.display FontFace.display = display

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display

Property.

[Experimental]

The display property of the `web.fonts.FontFace` interface determines
a font face is displayed based on whether and when it is downloaded
ready to use. This property is equivalent to the CSS font-display

`var display = FontFace.display
FontFace.display = display`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display`
sourceraw docstring

set-family!cljs

(set-family! this val)

Property.

[Draft] [Experimental]

The FontFace.family property allows the author to get or set font family of a web.fonts.FontFace object. This is equivalent the font-family descriptor of @font-face.

instanceOfFontFace.family = 'font family name'; var fontFace = instanceOfFontFace.family; // \"font family name\"

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family

Property.

[Draft]
[Experimental]

The FontFace.family property allows the author to get or set
font family of a `web.fonts.FontFace` object. This is equivalent
the `font-family` descriptor of `@font-face`.

`instanceOfFontFace.family = 'font family name';
var fontFace = instanceOfFontFace.family; // \"font family name\"`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family`
sourceraw docstring

set-feature-settings!cljs

(set-feature-settings! this val)

Property.

[Draft] [Experimental]

The featureSettings property of the web.fonts.FontFace interface or sets infrequently used font features that are not available a font's variant properties. It is equivalent to the font-feature-settings

var featureSettingDescriptor = FontFace.featureSettings; FontFace.featureSettings = featureSettingDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings

Property.

[Draft]
[Experimental]

The featureSettings property of the `web.fonts.FontFace` interface
or sets infrequently used font features that are not available
a font's variant properties. It is equivalent to the `font-feature-settings`

`var featureSettingDescriptor = FontFace.featureSettings;
FontFace.featureSettings = featureSettingDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings`
sourceraw docstring

set-stretch!cljs

(set-stretch! this val)

Property.

[Draft] [Experimental]

The stretch property of the web.fonts.FontFace interface retrieves sets how the font stretches. It is equivalent to the font-stretch

var stretchDescriptor = FontFace.stretch; FontFace.stretch = stretchDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch

Property.

[Draft]
[Experimental]

The stretch property of the `web.fonts.FontFace` interface retrieves
sets how the font stretches. It is equivalent to the `font-stretch`

`var stretchDescriptor = FontFace.stretch;
FontFace.stretch = stretchDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch`
sourceraw docstring

set-style!cljs

(set-style! this val)

Property.

[Draft] [Experimental]

The style property of the web.fonts.FontFace interface retrieves sets the font's style. It is equivalent to the font-style descriptor.

var style = FontFace.style; FontFace.style = value;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style

Property.

[Draft]
[Experimental]

The style property of the `web.fonts.FontFace` interface retrieves
sets the font's style. It is equivalent to the `font-style` descriptor.

`var style = FontFace.style;
FontFace.style = value;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style`
sourceraw docstring

set-unicode-range!cljs

(set-unicode-range! this val)

Property.

[Draft] [Experimental]

The unicodeRange property of the web.fonts.FontFace interface or sets the range of unicode codepoints encompassing the font. is equivalent to the unicode-range descriptor.

var unicodeRangeDescriptor = FontFace.unicodeRange; FontFace.unicodeRange = unicodeRangeDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange

Property.

[Draft]
[Experimental]

The unicodeRange property of the `web.fonts.FontFace` interface
or sets the range of unicode codepoints encompassing the font.
is equivalent to the `unicode-range` descriptor.

`var unicodeRangeDescriptor = FontFace.unicodeRange;
FontFace.unicodeRange = unicodeRangeDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange`
sourceraw docstring

set-variant!cljs

(set-variant! this val)

Property.

[Draft] [Experimental]

The variant property of the web.fonts.FontFace interface programatically or sets font variant values. It is equivalent to the font-variant

var variantSubProperty = FontFace.variant; FontFace.variant = variantSubProperty;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant

Property.

[Draft]
[Experimental]

The variant property of the `web.fonts.FontFace` interface programatically
or sets font variant values. It is equivalent to the `font-variant`

`var variantSubProperty = FontFace.variant;
FontFace.variant = variantSubProperty;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant`
sourceraw docstring

set-weight!cljs

(set-weight! this val)

Property.

[Draft] [Experimental]

The weight property of the web.fonts.FontFace interface retrieves sets the weight of the font. It is equivalent to the font-weight

var weightDescriptor = FontFace.weight; FontFace.weight = weightDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight

Property.

[Draft]
[Experimental]

The weight property of the `web.fonts.FontFace` interface retrieves
sets the weight of the font. It is equivalent to the `font-weight`

`var weightDescriptor = FontFace.weight;
FontFace.weight = weightDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight`
sourceraw docstring

statuscljs

(status this)

Property.

[Read Only] [Draft] [Experimental]

The status read-only property of the web.fonts.FontFace interface an enumerated value indicating the status of the font, one of "loading", "loaded", or "error".

var status = FontFace.status;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/status

Property.

[Read Only]
[Draft]
[Experimental]

The status read-only property of the `web.fonts.FontFace` interface
an enumerated value indicating the status of the font, one of
\"loading\", \"loaded\", or \"error\".

`var status = FontFace.status;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/status`
sourceraw docstring

stretchcljs

(stretch this)

Property.

[Draft] [Experimental]

The stretch property of the web.fonts.FontFace interface retrieves sets how the font stretches. It is equivalent to the font-stretch

var stretchDescriptor = FontFace.stretch; FontFace.stretch = stretchDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch

Property.

[Draft]
[Experimental]

The stretch property of the `web.fonts.FontFace` interface retrieves
sets how the font stretches. It is equivalent to the `font-stretch`

`var stretchDescriptor = FontFace.stretch;
FontFace.stretch = stretchDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch`
sourceraw docstring

stylecljs

(style this)

Property.

[Draft] [Experimental]

The style property of the web.fonts.FontFace interface retrieves sets the font's style. It is equivalent to the font-style descriptor.

var style = FontFace.style; FontFace.style = value;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style

Property.

[Draft]
[Experimental]

The style property of the `web.fonts.FontFace` interface retrieves
sets the font's style. It is equivalent to the `font-style` descriptor.

`var style = FontFace.style;
FontFace.style = value;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style`
sourceraw docstring

unicode-rangecljs

(unicode-range this)

Property.

[Draft] [Experimental]

The unicodeRange property of the web.fonts.FontFace interface or sets the range of unicode codepoints encompassing the font. is equivalent to the unicode-range descriptor.

var unicodeRangeDescriptor = FontFace.unicodeRange; FontFace.unicodeRange = unicodeRangeDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange

Property.

[Draft]
[Experimental]

The unicodeRange property of the `web.fonts.FontFace` interface
or sets the range of unicode codepoints encompassing the font.
is equivalent to the `unicode-range` descriptor.

`var unicodeRangeDescriptor = FontFace.unicodeRange;
FontFace.unicodeRange = unicodeRangeDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange`
sourceraw docstring

variantcljs

(variant this)

Property.

[Draft] [Experimental]

The variant property of the web.fonts.FontFace interface programatically or sets font variant values. It is equivalent to the font-variant

var variantSubProperty = FontFace.variant; FontFace.variant = variantSubProperty;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant

Property.

[Draft]
[Experimental]

The variant property of the `web.fonts.FontFace` interface programatically
or sets font variant values. It is equivalent to the `font-variant`

`var variantSubProperty = FontFace.variant;
FontFace.variant = variantSubProperty;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant`
sourceraw docstring

weightcljs

(weight this)

Property.

[Draft] [Experimental]

The weight property of the web.fonts.FontFace interface retrieves sets the weight of the font. It is equivalent to the font-weight

var weightDescriptor = FontFace.weight; FontFace.weight = weightDescriptor;

See also: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight

Property.

[Draft]
[Experimental]

The weight property of the `web.fonts.FontFace` interface retrieves
sets the weight of the font. It is equivalent to the `font-weight`

`var weightDescriptor = FontFace.weight;
FontFace.weight = weightDescriptor;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close