Package org.apache.fop.fonts.type1
Class PFBData
java.lang.Object
org.apache.fop.fonts.type1.PFBData
Class that represents the contents of a PFB file.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Gets the encrypted segment of the font filebyte[]
Gets the header segment of the font fileint
Returns the full length of the raw font file.int
Returns the Length1 (length of the header segment).int
Returns the Length2 (length of the encrypted segment).int
Returns the Length3 (length of the trailer segment).int
Returns the format the font was loaded with.byte[]
Gets the trailer segment of the font filevoid
Writes the PFB file in raw format to an OutputStream.void
setEncryptedSegment
(byte[] encryptedSeg) Sets the encrypted segment of the font file.void
setHeaderSegment
(byte[] headerSeg) Sets the header segment of the font file.void
setPFBFormat
(int format) Sets the PFB format the font was loaded with.void
setTrailerSegment
(byte[] trailerSeg) Sets the trailer segment of the font file.toString()
-
Field Details
-
PFB_RAW
public static final int PFB_RAWRaw format, no special file structure- See Also:
-
PFB_PC
public static final int PFB_PCPC format- See Also:
-
PFB_MAC
public static final int PFB_MACMAC Format (unsupported, yet)- See Also:
-
-
Constructor Details
-
PFBData
public PFBData()
-
-
Method Details
-
setPFBFormat
public void setPFBFormat(int format) Sets the PFB format the font was loaded with.- Parameters:
format
- one of the PFB_* constants
-
getPFBFormat
public int getPFBFormat()Returns the format the font was loaded with.- Returns:
- int one of the PFB_* constants
-
setHeaderSegment
public void setHeaderSegment(byte[] headerSeg) Sets the header segment of the font file.- Parameters:
headerSeg
- the header segment
-
getHeaderSegment
public byte[] getHeaderSegment()Gets the header segment of the font file- Returns:
- Header segment as a byte array
-
setEncryptedSegment
public void setEncryptedSegment(byte[] encryptedSeg) Sets the encrypted segment of the font file.- Parameters:
encryptedSeg
- the encrypted segment
-
getEncryptedSegment
public byte[] getEncryptedSegment()Gets the encrypted segment of the font file- Returns:
- The encrypted segment as a byte array
-
setTrailerSegment
public void setTrailerSegment(byte[] trailerSeg) Sets the trailer segment of the font file.- Parameters:
trailerSeg
- the trailer segment
-
getTrailerSegment
public byte[] getTrailerSegment()Gets the trailer segment of the font file- Returns:
- The trailer segment as a byte array
-
getLength
public int getLength()Returns the full length of the raw font file.- Returns:
- int the raw file length
-
getLength1
public int getLength1()Returns the Length1 (length of the header segment).- Returns:
- int Length1
-
getLength2
public int getLength2()Returns the Length2 (length of the encrypted segment).- Returns:
- int Length2
-
getLength3
public int getLength3()Returns the Length3 (length of the trailer segment).- Returns:
- int Length3
-
outputAllParts
Writes the PFB file in raw format to an OutputStream.- Parameters:
out
- the OutputStream to write to- Throws:
IOException
- In case of an I/O problem
-
toString
-