package js.html
Available on jsThe
FontFace
interface represents a single usable font face. It allows control of the source of the font face, being a URL to an external resource, or a buffer; it also allows control of when the font face is loaded and its current status.Documentation FontFace by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
new (family:String, source:EitherType<String, EitherType<ArrayBuffer, ArrayBufferView>>, ?descriptors:FontFaceDescriptors)
Throws:
null |
DOMError |
---|
family:String
Is a DOMString
that contains the family of the font. It is equivalent to the @font-face/family
descriptor.
featureSettings:String
Is a DOMString
that contains the features of the font. It is equivalent to the @font-face/feature-settings
descriptor.
read only loaded:Promise<FontFace>
Returns a Promise
to a FontFace
that fulfills when the font is completely loaded and rejects when an error happens.
read only status:FontFaceLoadStatus
Returns an enumerated value indicating the status of the font. It can be one of the following: "unloaded"
, "loading"
, "loaded"
, or "error"
.
stretch:String
Is a DOMString
that contains how the font stretches. It is equivalent to the @font-face/stretch
descriptor.
style:String
Is a DOMString
that contains the style of the font. It is equivalent to the @font-face/style
descriptor.
unicodeRange:String
Is a DOMString
that contains the range of code encompassed the font. It is equivalent to the @font-face/unicode-range
descriptor.
variant:String
Is a DOMString
that contains the variant of the font. It is equivalent to the @font-face/range
descriptor.
weight:String
Is a DOMString
that contains the weight of the font. It is equivalent to the @font-face/weight
descriptor.
load ():Promise<FontFace>
Throws:
null |
DOMError |
---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/FontFace.html