|
fop 2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFDictionary
org.apache.fop.pdf.PDFFont
public class PDFFont
Class representing a /Font object.
A more complete object expressing the base font name and encoding of a font along with an internal name for the font used within streams of content.
Fonts are specified on page 198 and onwards of the PDF 1.3 spec.
Field Summary |
---|
Fields inherited from class org.apache.fop.pdf.PDFDictionary |
---|
entries, order |
Fields inherited from class org.apache.fop.pdf.PDFObject |
---|
log |
Constructor Summary | |
---|---|
PDFFont(java.lang.String fontname,
FontType subtype,
java.lang.String basefont,
java.lang.Object encoding)
create the /Font object |
Method Summary | |
---|---|
static PDFFont |
createFont(java.lang.String fontname,
FontType subtype,
java.lang.String basefont,
java.lang.Object encoding)
factory method with the basic parameters |
PDFName |
getBaseFont()
Returns the name of the BaseFont. |
java.lang.String |
getName()
Get the internal name used for this font. |
protected PDFName |
getPDFNameForFontType(FontType fontType)
Returns the PDF name for a certain font type. |
int |
output(java.io.OutputStream stream)
Write the PDF represention of this object |
void |
setEncoding(PDFEncoding encoding)
Sets the Encoding value of the font. |
void |
setEncoding(java.lang.String encoding)
Sets the Encoding value of the font. |
void |
setToUnicode(PDFCMap cmap)
Sets a ToUnicode CMap. |
protected void |
validate()
Validates the PDF object prior to serialization. |
Methods inherited from class org.apache.fop.pdf.PDFDictionary |
---|
containsKey, get, getChildren, getChildren, keySet, put, put, remove, writeDictionary |
Methods inherited from class org.apache.fop.pdf.PDFObject |
---|
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDFFont(java.lang.String fontname, FontType subtype, java.lang.String basefont, java.lang.Object encoding)
fontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontMethod Detail |
---|
public void setEncoding(java.lang.String encoding)
encoding
- the encodingpublic void setEncoding(PDFEncoding encoding)
encoding
- the encodingpublic void setToUnicode(PDFCMap cmap)
cmap
- the ToUnicode character mappublic static PDFFont createFont(java.lang.String fontname, FontType subtype, java.lang.String basefont, java.lang.Object encoding)
fontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the font
public java.lang.String getName()
public PDFName getBaseFont()
protected PDFName getPDFNameForFontType(FontType fontType)
fontType
- font type
protected void validate()
public int output(java.io.OutputStream stream) throws java.io.IOException
output
in class PDFDictionary
stream
- the stream to write the PDF to
java.io.IOException
- if there is an error writing to the stream
|
fop 2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |