Class FontCacheKey

java.lang.Object
com.itextpdf.io.font.FontCacheKey

public abstract class FontCacheKey extends Object
Defines an equality key for a cached font program source.

See FontCache

  • Constructor Details

    • FontCacheKey

      public FontCacheKey()
  • Method Details

    • create

      public static FontCacheKey create (String fontName)
      Creates a cache key for a font name.
      Parameters:
      fontName - the font name, possibly null
      Returns:
      a new name based cache key
    • create

      public static FontCacheKey create (String fontName, int ttcIndex)
      Creates a cache key for a font collection member identified by name.
      Parameters:
      fontName - the collection source name
      ttcIndex - the collection member index
      Returns:
      a new collection member cache key
    • create

      public static FontCacheKey create (byte[] fontProgram)
      Creates a cache key for font program bytes.
      Parameters:
      fontProgram - the font bytes, possibly null
      Returns:
      a new byte based cache key
    • create

      public static FontCacheKey create (byte[] fontProgram, int ttcIndex)
      Creates a cache key for a font collection member identified by bytes.
      Parameters:
      fontProgram - the collection bytes, possibly null
      ttcIndex - the collection member index
      Returns:
      a new collection member cache key