Class AFMChar


  • public class AFMChar
    extends java.lang.Object
    A simple implementation for an AFM char metric object

    This implementation will hold the information needed for implementing a simple pdf field layout mechanism. All attributes but name, code, and with are ignored.

    See the "Adobe Font Metrics File Format Specification"

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AFMChar​(int code, int width, java.lang.String name)
      AFMChar constructor comment.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AFMChar create​(java.lang.String glyph)
      Create a new glyph representation from the definition parsed from glyph.
      int getCode()
      The glyphs code.
      java.lang.String getName()
      The glyphs name.
      int getWidth()
      The glyphs width.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • AFM_TOKEN_WX

        public static java.lang.String AFM_TOKEN_WX
      • AFM_TOKEN_W

        public static java.lang.String AFM_TOKEN_W
      • AFM_TOKEN_W0X

        public static java.lang.String AFM_TOKEN_W0X
      • AFM_TOKEN_W0

        public static java.lang.String AFM_TOKEN_W0
      • AFM_TOKEN_N

        public static java.lang.String AFM_TOKEN_N
      • AFM_TOKEN_CH

        public static java.lang.String AFM_TOKEN_CH
      • AFM_TOKEN_C

        public static java.lang.String AFM_TOKEN_C
    • Constructor Detail

      • AFMChar

        protected AFMChar​(int code,
                          int width,
                          java.lang.String name)
        AFMChar constructor comment.
        Parameters:
        code - docme
        width - docme
        name - docme
    • Method Detail

      • create

        public static AFMChar create​(java.lang.String glyph)
        Create a new glyph representation from the definition parsed from glyph.
        Parameters:
        glyph - A string containing a definition for the glyph.
        Returns:
        The new glyph representation.
      • getCode

        public int getCode()
        The glyphs code.
        Returns:
        The glyphs code.
      • getName

        public java.lang.String getName()
        The glyphs name.
        Returns:
        The glyphs name.
      • getWidth

        public int getWidth()
        The glyphs width.
        Returns:
        The glyphs width.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object