Class MetricFile


  • public abstract class MetricFile
    extends java.lang.Object
    Represents the secondary file needed by type1 fonts to access kerning data, etc. Possible examples of metric files are .pfm, .afm, and suitcase files.

    Synchronization

    This class is immutable after contruction and contains no mutable static data. It is therefore threadsafe.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String getFamilyName()
      Fetch the platform name for the font associated with this file.
      abstract java.lang.String getFontName()
      Fetch the postscript name for the font associated with this file.
      abstract double getKernValue​(java.lang.String leftGlyphName, java.lang.String rightGlyphName)
      Fetch the kern value for 2 glyphIDs.
      java.net.URL getLocation()  
      abstract int getWeight()
      Fetch the weight for this font.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getKernValue

        public abstract double getKernValue​(java.lang.String leftGlyphName,
                                            java.lang.String rightGlyphName)
        Fetch the kern value for 2 glyphIDs.
      • getFamilyName

        public abstract java.lang.String getFamilyName()
        Fetch the platform name for the font associated with this file. Returns null if the file does not contain this information.
      • getFontName

        public abstract java.lang.String getFontName()
        Fetch the postscript name for the font associated with this file.
      • getWeight

        public abstract int getWeight()
        Fetch the weight for this font. Returns 0 if the file does not contain this information .
      • getLocation

        public final java.net.URL getLocation()