Class CloudFonts


  • public final class CloudFonts
    extends java.lang.Object
    Provides a default cloud font collection.
    Since:
    3.4
    Author:
    Chris Jennings
    • Method Detail

      • installReservedFamilies

        public static void installReservedFamilies()
        If the user has reserved font families in the default collection, this method ensures that the relevant fonts are up to date and registered. This is called during application startup.
      • isReservedFamily

        public static boolean isReservedFamily​(CloudFontFamily family)
        Returns true if the user has reserved the specified font family
        Parameters:
        familyName - the font family to check
        Returns:
        true if the user has reserved the font family, either in this session or in a previous session
      • addReservedFamily

        public static void addReservedFamily​(CloudFontFamily family)
        Adds a font family to the user's reserved list. Reserving a font family causes that family to be loaded and registered during application startup so that it is always available for the user to use by family name. The font will also be updated automatically as updates are published (when the local cache is updated by the cloud font connector). Note that only families from the default collection can be reserved.
        Parameters:
        family - the font family to reserve
        Throws:
        java.lang.NullPointerException - if family is null
        java.lang.IllegalArgumentException - if family is not from the default collection