Class FontResourceCache


  • class FontResourceCache
    extends java.lang.Object
    A cache for font resource objects.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private FontInfo fontInfo  
      private java.util.Map fontResources
      This is a map of PSResource instances of all fonts defined (key: font key)
    • Field Detail

      • fontInfo

        private final FontInfo fontInfo
      • fontResources

        private java.util.Map fontResources
        This is a map of PSResource instances of all fonts defined (key: font key)
    • Constructor Detail

      • FontResourceCache

        public FontResourceCache​(FontInfo fontInfo)
    • Method Detail

      • getFontResourceForFontKey

        public PSFontResource getFontResourceForFontKey​(java.lang.String key)
        Returns the PSFontResource for the given font key.
        Parameters:
        key - the font key ("F*")
        Returns:
        the matching PSFontResource instance
      • getPostScriptNameForFontKey

        private java.lang.String getPostScriptNameForFontKey​(java.lang.String key)
      • addAll

        public void addAll​(java.util.Map fontMap)
        Adds a number of fonts to the cache.
        Parameters:
        fontMap - the font map