public class Type1SubsetFile extends 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 List<String> |
charNames |
protected String |
eol |
protected List<PostscriptParser.PSElement> |
headerSection |
protected static org.apache.commons.logging.Log |
LOG |
protected List<PostscriptParser.PSElement> |
mainSection |
protected boolean |
standardEncoding |
protected HashMap<String,byte[]> |
subsetCharStrings |
protected boolean |
subsetSubroutines |
protected LinkedHashMap<Integer,byte[]> |
uniqueSubs |
| Constructor and Description |
|---|
Type1SubsetFile() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
createSubset(InputStream in,
SingleByteFont sbfont) |
protected String |
findVariable(byte[] decoded,
List<PostscriptParser.PSElement> elements,
String[] matches,
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(String elementID,
List<PostscriptParser.PSElement> elements) |
protected String |
getEntryPart(String entry,
int part) |
protected List<String> |
searchEntries(HashMap<Integer,String> encodingEntries,
int glyph) |
byte[] |
stitchFont(ByteArrayOutputStream boasHeader,
ByteArrayOutputStream boasMain,
ByteArrayOutputStream boasTrailer) |
protected ByteArrayOutputStream |
writeHeader(PFBData pfbData,
PostscriptParser.PSElement encoding) |
protected ByteArrayOutputStream |
writeMainSection(byte[] decoded,
List<PostscriptParser.PSElement> mainSection,
PostscriptParser.PSElement charStrings) |
protected void |
writeString(String entry,
ByteArrayOutputStream boas) |
protected static final org.apache.commons.logging.Log LOG
protected LinkedHashMap<Integer,byte[]> uniqueSubs
protected String eol
protected boolean subsetSubroutines
protected List<PostscriptParser.PSElement> headerSection
protected List<PostscriptParser.PSElement> mainSection
protected boolean standardEncoding
public byte[] createSubset(InputStream in, SingleByteFont sbfont) throws IOException
IOExceptionpublic byte[] stitchFont(ByteArrayOutputStream boasHeader, ByteArrayOutputStream boasMain, ByteArrayOutputStream boasTrailer) throws IOException
IOExceptionprotected List<String> searchEntries(HashMap<Integer,String> encodingEntries, int glyph)
protected ByteArrayOutputStream writeHeader(PFBData pfbData, PostscriptParser.PSElement encoding) throws IOException
IOExceptionprotected ByteArrayOutputStream writeMainSection(byte[] decoded, List<PostscriptParser.PSElement> mainSection, PostscriptParser.PSElement charStrings) throws IOException
IOExceptionprotected String findVariable(byte[] decoded, List<PostscriptParser.PSElement> elements, String[] matches, String fallback) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected void writeString(String entry, ByteArrayOutputStream boas) throws IOException
IOExceptionprotected 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 PostscriptParser.PSElement getElement(String elementID, List<PostscriptParser.PSElement> elements)
Copyright © 2019 Apache Software Foundation. All rights reserved.