Class Standard14Fonts


  • final class Standard14Fonts
    extends java.lang.Object
    The "Standard 14" PDF fonts, also known as the "base 14" fonts. There are 14 font files, but Acrobat uses additional names for compatibility, e.g. Arial.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Standard14Fonts()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void addAFM​(java.lang.String fontName)  
      private static void addAFM​(java.lang.String fontName, java.lang.String afmName)  
      static boolean containsName​(java.lang.String baseName)
      Returns true if the given font name a Standard 14 font.
      static FontMetrics getAFM​(java.lang.String baseName)
      Returns the AFM for the given font.
      static java.lang.String getMappedFontName​(java.lang.String baseName)
      Returns the name of the actual font which the given font name maps to.
      static java.util.Set<java.lang.String> getNames()
      Returns the set of Standard 14 font names, including additional names.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • STANDARD_14_NAMES

        private static final java.util.Set<java.lang.String> STANDARD_14_NAMES
      • STANDARD_14_MAPPING

        private static final java.util.Map<java.lang.String,​java.lang.String> STANDARD_14_MAPPING
      • STANDARD14_AFM_MAP

        private static final java.util.Map<java.lang.String,​FontMetrics> STANDARD14_AFM_MAP
    • Constructor Detail

      • Standard14Fonts

        private Standard14Fonts()
    • Method Detail

      • addAFM

        private static void addAFM​(java.lang.String fontName)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • addAFM

        private static void addAFM​(java.lang.String fontName,
                                   java.lang.String afmName)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • getAFM

        public static FontMetrics getAFM​(java.lang.String baseName)
        Returns the AFM for the given font.
        Parameters:
        baseName - base name of font
      • containsName

        public static boolean containsName​(java.lang.String baseName)
        Returns true if the given font name a Standard 14 font.
        Parameters:
        baseName - base name of font
      • getNames

        public static java.util.Set<java.lang.String> getNames()
        Returns the set of Standard 14 font names, including additional names.
      • getMappedFontName

        public static java.lang.String getMappedFontName​(java.lang.String baseName)
        Returns the name of the actual font which the given font name maps to.
        Parameters:
        baseName - base name of font