org.apache.fop.fonts.type1

## Class Type1SubsetFile

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

-     public class Type1SubsetFile
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Type1SubsetFile.BinaryCoder` A class to encode and decode sections of a type 1 font file.
    `static class` | `Type1SubsetFile.BytesNumber` A class used to store the last number operand and also it's size in bytes

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<java.lang.String>` | `charNames`
    `protected java.lang.String` | `eol`
    `protected java.util.List<PostscriptParser.PSElement>` | `headerSection`
    `protected static org.apache.commons.logging.Log` | `LOG`
    `protected java.util.List<PostscriptParser.PSElement>` | `mainSection`
    `protected boolean` | `standardEncoding`
    `protected java.util.HashMap<java.lang.String,byte[]>` | `subsetCharStrings`
    `protected boolean` | `subsetSubroutines`
    `protected java.util.LinkedHashMap<java.lang.Integer,byte[]>` | `uniqueSubs`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Type1SubsetFile()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `createSubset(java.io.InputStream in, SingleByteFont sbfont)`
    `protected java.lang.String` | `findVariable(byte[] decoded, java.util.List<PostscriptParser.PSElement> elements, java.lang.String[] matches, java.lang.String fallback)`
    `protected byte[]` | `getBinaryEntry(int[] position, byte[] decoded)` Returns a section of a byte array determined by it's start and end position.
    `protected PostscriptParser.PSElement` | `getElement(java.lang.String elementID, java.util.List<PostscriptParser.PSElement> elements)`
    `protected java.lang.String` | `getEntryPart(java.lang.String entry, int part)`
    `protected java.util.List<java.lang.String>` | `searchEntries(java.util.HashMap<java.lang.Integer,java.lang.String> encodingEntries, int glyph)`
    `protected byte[]` | `stitchFont(java.io.ByteArrayOutputStream boasHeader, java.io.ByteArrayOutputStream boasMain, java.io.ByteArrayOutputStream boasTrailer)`
    `protected java.io.ByteArrayOutputStream` | `writeHeader(PFBData pfbData, PostscriptParser.PSElement encoding)`
    `protected java.io.ByteArrayOutputStream` | `writeMainSection(byte[] decoded, java.util.List<PostscriptParser.PSElement> mainSection, PostscriptParser.PSElement charStrings)`
    `protected void` | `writeString(java.lang.String entry, java.io.ByteArrayOutputStream boas)`

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

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

- - ### Field Detail

    - #### LOG

          protected static final org.apache.commons.logging.Log LOG

    - #### subsetCharStrings

          protected java.util.HashMap<java.lang.String,byte[]> subsetCharStrings

    - #### charNames

          protected java.util.List<java.lang.String> charNames

    - #### uniqueSubs

          protected java.util.LinkedHashMap<java.lang.Integer,byte[]> uniqueSubs

    - #### eol

          protected java.lang.String eol

    - #### subsetSubroutines

          protected boolean subsetSubroutines

    - #### headerSection

          protected java.util.List<PostscriptParser.PSElement> headerSection

    - #### mainSection

          protected java.util.List<PostscriptParser.PSElement> mainSection

    - #### standardEncoding

          protected boolean standardEncoding

  - ### Constructor Detail

    - #### Type1SubsetFile

          public Type1SubsetFile()

  - ### Method Detail

    - #### createSubset

          public byte[] createSubset(java.io.InputStream in,
                                     SingleByteFont sbfont)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### stitchFont

          protected byte[] stitchFont(java.io.ByteArrayOutputStream boasHeader,
                                      java.io.ByteArrayOutputStream boasMain,
                                      java.io.ByteArrayOutputStream boasTrailer)
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### searchEntries

          protected java.util.List<java.lang.String> searchEntries(java.util.HashMap<java.lang.Integer,java.lang.String> encodingEntries,
                                                                   int glyph)

    - #### writeHeader

          protected java.io.ByteArrayOutputStream writeHeader(PFBData pfbData,
                                                              PostscriptParser.PSElement encoding)
                                                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeMainSection

          protected java.io.ByteArrayOutputStream writeMainSection(byte[] decoded,
                                                                   java.util.List<PostscriptParser.PSElement> mainSection,
                                                                   PostscriptParser.PSElement charStrings)
                                                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### findVariable

          protected java.lang.String findVariable(byte[] decoded,
                                                  java.util.List<PostscriptParser.PSElement> elements,
                                                  java.lang.String[] matches,
                                                  java.lang.String fallback)
                                           throws java.io.UnsupportedEncodingException

      Throws:
        `java.io.UnsupportedEncodingException`

    - #### writeString

          protected void writeString(java.lang.String entry,
                                     java.io.ByteArrayOutputStream boas)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getBinaryEntry

          protected byte[] getBinaryEntry(int[] position,
                                          byte[] decoded)

      Returns a section of a byte array determined by it's start and end position.
      Parameters:
        `position` - An array containing both the start and end position of the section to copy.
        `decoded` - The array from which to copy a section of data
      Returns:
        Returns the copy of the data section

    - #### getEntryPart

          protected java.lang.String getEntryPart(java.lang.String entry,
                                                  int part)

    - #### getElement

          protected PostscriptParser.PSElement getElement(java.lang.String elementID,
                                                          java.util.List<PostscriptParser.PSElement> elements)

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.