public class Type1SubsetFile
extends java.lang.Object
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
|
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 and Description |
---|
Type1SubsetFile() |
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) |
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) |
protected static final org.apache.commons.logging.Log LOG
protected java.util.HashMap<java.lang.String,byte[]> subsetCharStrings
protected java.util.List<java.lang.String> charNames
protected java.util.LinkedHashMap<java.lang.Integer,byte[]> uniqueSubs
protected java.lang.String eol
protected boolean subsetSubroutines
protected java.util.List<PostscriptParser.PSElement> headerSection
protected java.util.List<PostscriptParser.PSElement> mainSection
protected boolean standardEncoding
public byte[] createSubset(java.io.InputStream in, SingleByteFont sbfont) throws java.io.IOException
java.io.IOException
public byte[] stitchFont(java.io.ByteArrayOutputStream boasHeader, java.io.ByteArrayOutputStream boasMain, java.io.ByteArrayOutputStream boasTrailer) throws java.io.IOException
java.io.IOException
protected java.util.List<java.lang.String> searchEntries(java.util.HashMap<java.lang.Integer,java.lang.String> encodingEntries, int glyph)
protected java.io.ByteArrayOutputStream writeHeader(PFBData pfbData, PostscriptParser.PSElement encoding) throws java.io.IOException
java.io.IOException
protected java.io.ByteArrayOutputStream writeMainSection(byte[] decoded, java.util.List<PostscriptParser.PSElement> mainSection, PostscriptParser.PSElement charStrings) throws java.io.IOException
java.io.IOException
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
java.io.UnsupportedEncodingException
protected void writeString(java.lang.String entry, java.io.ByteArrayOutputStream boas) throws java.io.IOException
java.io.IOException
protected byte[] getBinaryEntry(int[] position, byte[] decoded)
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 dataprotected java.lang.String getEntryPart(java.lang.String entry, int part)
protected PostscriptParser.PSElement getElement(java.lang.String elementID, java.util.List<PostscriptParser.PSElement> elements)
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.