org.apache.fop.fonts.type1

## Class AFMParser

- java.lang.Object
- - org.apache.fop.fonts.type1.AFMParser

-     public class AFMParser
      extends Object

  Parses the contents of a Type 1 AFM font metrics file into an object structure (`AFMFile`).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AFMParser()` Main constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AFMFile` | `parse(BufferedReader reader, String afmFileName)` Parses an AFM file from a BufferedReader.
    `AFMFile` | `parse(InputStream in, String afmFileName)` Parses an AFM file from a stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AFMParser

          public AFMParser()

      Main constructor.

  - ### Method Detail

    - #### parse

          public AFMFile parse(InputStream in,
                               String afmFileName)
                        throws IOException

      Parses an AFM file from a stream.
      Parameters:
        `in` - the stream to read from
        `afmFileName` - the name of the AFM file
      Returns:
        the parsed AFM file
      Throws:
        `IOException` - if an I/O error occurs

    - #### parse

          public AFMFile parse(BufferedReader reader,
                               String afmFileName)
                        throws IOException

      Parses an AFM file from a BufferedReader.
      Parameters:
        `reader` - the BufferedReader instance to read from
        `afmFileName` - the name of the AFM file
      Returns:
        the parsed AFM file
      Throws:
        `IOException` - if an I/O error occurs

Copyright © 2023 Apache Software Foundation. All rights reserved.