public class OTFSubSetFile extends OTFSubSetWriter
OpenFont.PostScriptVersion
Modifier and Type | Field and Description |
---|---|
protected CFFDataReader |
cffReader
The CFF reader object used to read data and offsets from the original font file
|
protected java.lang.String |
embeddedName
The embedded name to change in the name table
|
protected java.util.Map<java.lang.Integer,java.lang.Integer> |
gidToSID
A map of the new GID to SID used to construct the charset table
|
protected CFFDataReader.CFFIndexData |
globalIndexSubr |
protected java.util.List<java.lang.Integer> |
globalUniques |
protected CFFDataReader.CFFIndexData |
localIndexSubr |
protected java.util.List<java.lang.Integer> |
localUniques
A list of unique subroutines from the global / local subroutine indexes
|
static int |
NUM_STANDARD_STRINGS
The number of standard strings in CFF
|
protected java.util.List<byte[]> |
stringIndexData
An array used to hold the string index data for the subset font
|
protected java.util.List<byte[]> |
subsetCharStringsIndex
A list of char string data for each glyph to be stored in the subset font
|
protected java.util.List<byte[]> |
subsetGlobalIndexSubr |
protected int |
subsetGlobalSubrCount |
protected java.util.Map<java.lang.Integer,java.lang.Integer> |
subsetGlyphs
A map containing each glyph to be included in the subset
with their existing and new GID's
|
protected java.util.List<byte[]> |
subsetLocalIndexSubr
List of subroutines to write to the local / global indexes in the subset font
|
protected int |
subsetLocalSubrCount
A store of the number of subroutines each global / local subroutine will store
|
currentPos, output, realSize
advancedTableReader, cid, dirTabs, embedFontName, familyNames, fontFile, fullName, lastLoca, locaFormat, log, mtxTab, nhmtx, notice, numberOfGlyphs, postScriptName, subFamilyName, TRACE_ENABLED, unicodeMappings, useAdvanced, useKerning
Constructor and Description |
---|
OTFSubSetFile() |
Modifier and Type | Method and Description |
---|---|
protected void |
createCFF() |
protected void |
createCharStringDataCID() |
static byte[] |
createNewRef(int newRef,
int[] operatorCode,
int forceLength,
boolean isDict) |
CFFDataReader |
getCFFReader()
Returns the parsed CFF data for the original font.
|
protected java.util.List<java.lang.Integer> |
getUsedFDFonts() |
void |
readFont(FontFileReader in,
java.lang.String embeddedName,
java.lang.String header,
MultiByteFont mbFont) |
protected java.util.List<java.lang.Integer> |
storeFDStrings(java.util.List<java.lang.Integer> uniqueNewRefs) |
protected void |
updateCIDOffsets(int topDictDataOffset,
int fdArrayOffset,
int fdSelectOffset,
int charsetOffset,
int charStringOffset,
int encodingOffset) |
protected void |
updateFixedOffsets(java.util.Map<java.lang.String,CFFDataReader.DICTEntry> topDICT,
int dataTopDictOffset,
int charsetOffset,
int charStringOffset,
int encodingOffset) |
protected void |
updateOffset(byte[] out,
int position,
int length,
int replacement) |
protected void |
updateOffsets(int topDictOffset,
int charsetOffset,
int charStringOffset,
int privateDictOffset,
int localIndexOffset,
int encodingOffset) |
protected void |
writeCIDCount(CFFDataReader.DICTEntry dictEntry) |
protected java.util.List<java.lang.Integer> |
writeCIDDictsAndSubrs(java.util.List<java.lang.Integer> uniqueNewRefs) |
protected int |
writeFDArray(java.util.List<java.lang.Integer> uniqueNewRefs,
java.util.List<java.lang.Integer> privateDictOffsets,
java.util.List<java.lang.Integer> fontNameSIDs) |
protected void |
writeFDSelect() |
protected int |
writeIndex(java.util.List<byte[]> dataArray) |
protected void |
writePrivateDict() |
protected void |
writeTopDICT() |
concatArray, getFontSubset, writeByte, writeBytes, writeBytes, writeCard16, writeThreeByteNumber, writeULong
getCFFData, initializeFont, readName, updateBBoxAndOffset
checkTTC, convertTTFUnit2PDFUnit, createCMaps, determineAscDesc, getAnsiKerning, getBBox, getBBoxRaw, getBoundingBoxes, getCapHeight, getCharSetName, getCharWidth, getCharWidthRaw, getCMaps, getCopyrightNotice, getDirectoryEntry, getEmbedFontName, getFamilyNames, getFirstChar, getFlags, getFontBBox, getFullName, getGDEF, getGPOS, getGSUB, getItalicAngle, getKerning, getLastChar, getLowerCaseAscent, getLowerCaseDescent, getMtx, getNumGlyphs, getPadSize, getPostScriptName, getStemV, getStrikeoutPosition, getStrikeoutThickness, getSubFamilyName, getTTCnames, getUnderlinePosition, getUnderlineThickness, getWeightClass, getWidths, getXHeight, guessVerticalMetricsFromGlyphBBox, handleCharacterSpacing, hasAdvancedTable, initAnsiWidths, isCFF, isEmbeddable, main, printStuff, readCMAP, readDirTabs, readFont, readFont, readFont, readFontHeader, readHorizontalHeader, readHorizontalMetrics, readKerning, readOS2, readPCLT, readPostScript, seekTab, stream
protected java.util.Map<java.lang.Integer,java.lang.Integer> subsetGlyphs
protected java.util.Map<java.lang.Integer,java.lang.Integer> gidToSID
protected CFFDataReader.CFFIndexData localIndexSubr
protected CFFDataReader.CFFIndexData globalIndexSubr
protected java.util.List<byte[]> subsetLocalIndexSubr
protected java.util.List<byte[]> subsetGlobalIndexSubr
protected java.util.List<java.lang.Integer> localUniques
protected java.util.List<java.lang.Integer> globalUniques
protected int subsetLocalSubrCount
protected int subsetGlobalSubrCount
protected java.util.List<byte[]> subsetCharStringsIndex
protected java.lang.String embeddedName
protected java.util.List<byte[]> stringIndexData
protected CFFDataReader cffReader
public static final int NUM_STANDARD_STRINGS
public OTFSubSetFile() throws java.io.IOException
java.io.IOException
public void readFont(FontFileReader in, java.lang.String embeddedName, java.lang.String header, MultiByteFont mbFont) throws java.io.IOException
java.io.IOException
protected void createCFF() throws java.io.IOException
java.io.IOException
protected java.util.List<java.lang.Integer> storeFDStrings(java.util.List<java.lang.Integer> uniqueNewRefs) throws java.io.IOException
java.io.IOException
protected void writeTopDICT() throws java.io.IOException
java.io.IOException
protected void writeCIDCount(CFFDataReader.DICTEntry dictEntry) throws java.io.IOException
java.io.IOException
protected void createCharStringDataCID() throws java.io.IOException
java.io.IOException
protected void writeFDSelect()
protected java.util.List<java.lang.Integer> getUsedFDFonts()
protected java.util.List<java.lang.Integer> writeCIDDictsAndSubrs(java.util.List<java.lang.Integer> uniqueNewRefs) throws java.io.IOException
java.io.IOException
protected int writeFDArray(java.util.List<java.lang.Integer> uniqueNewRefs, java.util.List<java.lang.Integer> privateDictOffsets, java.util.List<java.lang.Integer> fontNameSIDs) throws java.io.IOException
java.io.IOException
public static byte[] createNewRef(int newRef, int[] operatorCode, int forceLength, boolean isDict)
protected int writeIndex(java.util.List<byte[]> dataArray)
protected void writePrivateDict() throws java.io.IOException
java.io.IOException
protected void updateOffsets(int topDictOffset, int charsetOffset, int charStringOffset, int privateDictOffset, int localIndexOffset, int encodingOffset) throws java.io.IOException
java.io.IOException
protected void updateFixedOffsets(java.util.Map<java.lang.String,CFFDataReader.DICTEntry> topDICT, int dataTopDictOffset, int charsetOffset, int charStringOffset, int encodingOffset)
protected void updateCIDOffsets(int topDictDataOffset, int fdArrayOffset, int fdSelectOffset, int charsetOffset, int charStringOffset, int encodingOffset)
protected void updateOffset(byte[] out, int position, int length, int replacement)
public CFFDataReader getCFFReader()
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.