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() |
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 © 2025 Apache Software Foundation. All rights reserved.