Class CssFontFace

java.lang.Object
com.itextpdf.styledxmlparser.css.font.CssFontFace

public class CssFontFace extends Object
Class that will examine the font as described in the CSS, and store it in a form that the font provider will understand.
  • Method Details

    • create

      public static CssFontFace create (List<CssDeclaration> properties)
      Create a CssFontFace instance from a list of CSS font attributes ("font-family" or "src").
      Parameters:
      properties - the font properties
      Returns:
      the CssFontFace instance
    • splitSourcesSequence

      public static String[] splitSourcesSequence (String src)
      Processes and splits a string sequence containing a url/uri.
      Parameters:
      src - a string representing css src attribute
      Returns:
      an array of String urls for font loading
    • isSupportedFontFormat

      public static boolean isSupportedFontFormat (CssFontFace.FontFormat format)
      Checks whether in general we support requested font format.
      Parameters:
      format - CssFontFace.FontFormat
      Returns:
      true, if supported or unrecognized.
    • getFontFamily

      public String getFontFamily()
      Gets the font-family. Actually font-family is an alias.
      Returns:
      the font family (or alias)
    • getSources

      public List<CssFontFace.CssFontFaceSrc> getSources()
      Gets the font face sources.
      Returns:
      the sources