Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FontLoader class usage

    Hello, I've just noticed the addition of the FontLoader class.
    I wonder if I may call the (undocumented) method loadCustomFonts to load fonts declared in a custom css file.
    Currently it loads only fonts declared in the skin_styles.css file, right?

    #2
    That undoc'd method is only intended to be called once from load_skin.js with a complete list of all custom fonts (which as shipped should match the @font-faces declared in skin_styles.css).

    However, we've added support for a new window property isc_additionalFonts, that can be set to an array of additional font family names, beyond those declared in the skin, that you've declared in your own CSS via @font-face.. So if you set it to, say, ["foo", "bar"], then those fonts will be force-loaded in addition to those defined in the skin and passed to the loadCustomFonts() API in load_skin.js.

    This new property should be present in the nightly builds dated 2017-09-16 and beyond.

    Comment


      #3
      Thank you very much, I'm just trying it and it seems to work nicely.
      In the docs there are onLoadingComplete and onLoadingFailed methods, but they doesn't seem to work...actually I don't see them in source code.

      Comment


        #4
        You're seeing those in the current documentation? They were removed from the docs and the source code in favor of page events

        Comment


          #5
          I saw them in the 2017-09-13 build, now I see the change in favor of page events, thank you for the heads up.

          Comment

          Working...
          X