Interface WebFontService


  • public interface WebFontService
    Service framework for using any web font service.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getEmbeddingCode​(java.lang.String themePath, java.util.Set<java.lang.String> usedFonts)
      It should return a string containing the html code (script tag or link tag) required for using the web font service.
      java.util.List<java.lang.String> getFontList​(java.lang.String themePath)
      Gets a list of fonts that are made available by the web font service.
    • Method Detail

      • getFontList

        java.util.List<java.lang.String> getFontList​(java.lang.String themePath)
        Gets a list of fonts that are made available by the web font service.
        Parameters:
        themePath - The path to jcr:content node of theme on which the service is configured.
        Returns:
        A list of string where each string represents a font provided by web font service.
        Format for string representing font: font-name=font-family-value
        Ex. A font named "XXXX" with font-family value "YYYY" will look like "XXXX=YYYY"
      • getEmbeddingCode

        java.lang.String getEmbeddingCode​(java.lang.String themePath,
                                          java.util.Set<java.lang.String> usedFonts)
        It should return a string containing the html code (script tag or link tag) required for using the web font service.
        Parameters:
        themePath - The path to jcr:content node of theme on which the service is configured.
        usedFonts - A set of all (not specific to the web font service) font-family values which are being used in form or theme.
        Returns:
        The html embed code (script tag or link tag) required for using the web font service. Empty String if invalid parameters are passed.