Class FontFaceSet

java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class FontFaceSet extends EventTarget
A JavaScript object for FontFaceSet.
See Also:
  • Constructor Details

    • FontFaceSet

      public FontFaceSet()
      Creates an instance.
  • Method Details

    • jsConstructor

      public void jsConstructor()
      JavaScript constructor.
      Overrides:
      jsConstructor in class EventTarget
    • load

      public Object load(String font, String text)
      Parameters:
      font - a font specification using the CSS value syntax, e.g. "italic bold 16px Roboto"
      text - limit the font faces to those whose Unicode range contains at least one of the characters in text. This does not check for individual glyph coverage.
      Returns:
      a Promise of an Array of FontFace loaded. The promise is fulfilled when all the fonts are loaded; it is rejected if one of the fonts failed to load.