Class TrueTypeFontSubSet
java.lang.Object
com.lowagie.text.pdf.TrueTypeFontSubSet
Deprecated.
Subsets a True Type font by removing the unneeded glyphs from the font.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final intDeprecated.protected intDeprecated.(package private) static final int[]Deprecated.protected StringDeprecated.The file name.protected intDeprecated.protected intDeprecated.Deprecated.Deprecated.(package private) static final intDeprecated.protected booleanDeprecated.protected booleanDeprecated.protected booleanDeprecated.protected int[]Deprecated.protected intDeprecated.(package private) static final intDeprecated.protected byte[]Deprecated.protected int[]Deprecated.protected byte[]Deprecated.protected byte[]Deprecated.protected RandomAccessFileOrArrayDeprecated.The file in use.(package private) static final intDeprecated.(package private) static final intDeprecated.(package private) static final intDeprecated.Deprecated.Contains the location of the several tables.protected intDeprecated.(package private) static final String[]Deprecated.(package private) static final String[]Deprecated.(package private) static final String[]Deprecated.(package private) static final intDeprecated.(package private) static final intDeprecated.(package private) static final intDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionTrueTypeFontSubSet(String fileName, RandomAccessFileOrArray rf, HashMap<Integer, int[]> glyphsUsed, int directoryOffset, boolean includeCmap, boolean includeExtras) Deprecated.Creates a new TrueTypeFontSubSet -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated.protected intcalculateChecksum(byte[] b) Deprecated.protected voidcheckGlyphComposite(int glyph) Deprecated.protected voidDeprecated.protected voidDeprecated.protected voidDeprecated.protected voidDeprecated.(package private) byte[]process()Deprecated.Does the actual work of subsetting the font.protected voidreadLoca()Deprecated.protected StringreadStandardString(int length) Deprecated.Reads aStringfrom the font file as bytes using the Cp1252 encoding.protected voidwriteFontInt(int n) Deprecated.protected voidwriteFontShort(int n) Deprecated.protected voidDeprecated.
-
Field Details
-
tableNamesSimple
Deprecated. -
tableNamesCmap
Deprecated. -
tableNamesExtra
Deprecated. -
entrySelectors
static final int[] entrySelectorsDeprecated. -
TABLE_CHECKSUM
static final int TABLE_CHECKSUMDeprecated.- See Also:
-
TABLE_OFFSET
static final int TABLE_OFFSETDeprecated.- See Also:
-
TABLE_LENGTH
static final int TABLE_LENGTHDeprecated.- See Also:
-
HEAD_LOCA_FORMAT_OFFSET
static final int HEAD_LOCA_FORMAT_OFFSETDeprecated.- See Also:
-
ARG_1_AND_2_ARE_WORDS
static final int ARG_1_AND_2_ARE_WORDSDeprecated.- See Also:
-
WE_HAVE_A_SCALE
static final int WE_HAVE_A_SCALEDeprecated.- See Also:
-
MORE_COMPONENTS
static final int MORE_COMPONENTSDeprecated.- See Also:
-
WE_HAVE_AN_X_AND_Y_SCALE
static final int WE_HAVE_AN_X_AND_Y_SCALEDeprecated.- See Also:
-
WE_HAVE_A_TWO_BY_TWO
static final int WE_HAVE_A_TWO_BY_TWODeprecated.- See Also:
-
tableDirectory
-
rf
-
fileName
-
includeCmap
protected boolean includeCmapDeprecated. -
includeExtras
protected boolean includeExtrasDeprecated. -
locaShortTable
protected boolean locaShortTableDeprecated. -
locaTable
protected int[] locaTableDeprecated. -
glyphsUsed
-
glyphsInList
-
tableGlyphOffset
protected int tableGlyphOffsetDeprecated. -
newLocaTable
protected int[] newLocaTableDeprecated. -
newLocaTableOut
protected byte[] newLocaTableOutDeprecated. -
newGlyfTable
protected byte[] newGlyfTableDeprecated. -
glyfTableRealSize
protected int glyfTableRealSizeDeprecated. -
locaTableRealSize
protected int locaTableRealSizeDeprecated. -
outFont
protected byte[] outFontDeprecated. -
fontPtr
protected int fontPtrDeprecated. -
directoryOffset
protected int directoryOffsetDeprecated.
-
-
Constructor Details
-
TrueTypeFontSubSet
TrueTypeFontSubSet(String fileName, RandomAccessFileOrArray rf, HashMap<Integer, int[]> glyphsUsed, int directoryOffset, boolean includeCmap, boolean includeExtras) Deprecated.Creates a new TrueTypeFontSubSet- Parameters:
fileName- the file name of the fontglyphsUsed- the glyphs useddirectoryOffset- The offset from the start of the file to the table directoryincludeCmap-trueif the table cmap is to be included in the generated font
-
-
Method Details
-
process
Deprecated.Does the actual work of subsetting the font.- Returns:
- the subset font
- Throws:
IOException- on errorDocumentException- on error
-
assembleFont
-
createTableDirectory
Deprecated.- Throws:
IOExceptionDocumentException
-
readLoca
Deprecated.- Throws:
IOExceptionDocumentException
-
createNewGlyphTables
-
locaTobytes
protected void locaTobytes()Deprecated. -
flatGlyphs
Deprecated.- Throws:
IOExceptionDocumentException
-
checkGlyphComposite
-
readStandardString
Deprecated.Reads aStringfrom the font file as bytes using the Cp1252 encoding.- Parameters:
length- the length of bytes to read- Returns:
- the
Stringread - Throws:
IOException- the font file could not be read
-
writeFontShort
protected void writeFontShort(int n) Deprecated. -
writeFontInt
protected void writeFontInt(int n) Deprecated. -
writeFontString
Deprecated. -
calculateChecksum
protected int calculateChecksum(byte[] b) Deprecated.
-