Class FontFaceSet

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.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:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
    • Field Summary

      • Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
      • Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable

        NOT_FOUND
    • Constructor Summary

      Constructors 
      Constructor Description
      FontFaceSet()
      Creates an instance.
    • Constructor Detail

      • FontFaceSet

        public FontFaceSet()
        Creates an instance.
    • Method Detail

      • load

        public java.lang.Object load​(java.lang.String font,
                                     java.lang.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.