Class TrueTypeFontRegistry

    • Constructor Detail

      • TrueTypeFontRegistry

        public TrueTypeFontRegistry()
    • Method Detail

      • internalGetSecondLevelCache

        protected static FontCache internalGetSecondLevelCache()
      • getSecondLevelCache

        public FontCache getSecondLevelCache()
      • addFont

        protected boolean addFont​(File file,
                                  String encoding)
                           throws IOException
        Description copied from class: AbstractFontFileRegistry
        Adds the fontname by creating the basefont object. This method tries to load the fonts as embeddable fonts, if this fails, it repeats the loading with the embedded-flag set to false.
        Specified by:
        addFont in class AbstractFontFileRegistry
        Parameters:
        file - the font file name.
        encoding - the encoding.
        Returns:
        true, if registration was successful, false otherwise.
        Throws:
        IOException - if the base font file could not be read.
      • createMetricsFactory

        public FontMetricsFactory createMetricsFactory()
        Creates a new font metrics factory. That factory is specific to a certain font registry and is not required to handle font records from foreign font registries.

        A font metrics factory should never be used on its own. It should be embedded into and used by a FontStorage implementation.

        Returns:
        a new FontMetricsFactory instance