|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.foray.pdf.object.PDFObject
org.foray.pdf.object.PDFFontDescriptor
public class PDFFontDescriptor
Class representing a PDF Font Descriptor. Font descriptors are specified in Section 5.7 of the PDF 1.3 spec.
| Field Summary |
|---|
| Fields inherited from class org.foray.pdf.object.PDFObject |
|---|
EOL, MSG_EOL, XREF_EOL |
| Constructor Summary | |
|---|---|
PDFFontDescriptor(PDFDocument doc,
PDFFont font)
Constructor for the /FontDescriptor object. |
|
| Method Summary | |
|---|---|
protected void |
embedFont()
Sets this font up so that it will be embedded in the PDF document. |
protected void |
fillInPDF(StringBuilder begin)
Fill in the specifics for the font's descriptor. |
static PDFFontDescriptor |
makeFontDescriptor(PDFDocument pdfDoc,
PDFFont font)
Factory method to create an appropriate font descriptor. |
void |
setFontFile(PDFFont.SubType subtype,
PDFFontFileStream fontfile)
Set the optional font file stream. |
void |
setMetrics(int avgWidth,
int maxWidth,
int missingWidth,
int leading,
int stemH,
int xHeight)
Set the optional metrics. |
String |
toPDF()
Generates the PDF text necessary to represent the object, returning it as a String. |
| Methods inherited from class org.foray.pdf.object.PDFObject |
|---|
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDFFontDescriptor(PDFDocument doc,
PDFFont font)
doc - The parent PDFDocument.font - The PDF Font which this descriptor describes.| Method Detail |
|---|
public static PDFFontDescriptor makeFontDescriptor(PDFDocument pdfDoc,
PDFFont font)
pdfDoc - The parent PDF document.font - The font to be encapsulated.
public void setMetrics(int avgWidth,
int maxWidth,
int missingWidth,
int leading,
int stemH,
int xHeight)
avgWidth - The average width of glyphs in the font, in millipoints.maxWidth - The maximum width of glyphs in the font, in millipoints.missingWidth - The default width of glypys in the font, in
millipoints.leading - The leading for this font, in millipoints.stemH - The horizontal stem weight for this font.xHeight - The x-height of this font, in millipoints.
public void setFontFile(PDFFont.SubType subtype,
PDFFontFileStream fontfile)
subtype - The font type defined in the font streamfontfile - The stream containing an embedded fontpublic String toPDF()
PDFObject
protected void fillInPDF(StringBuilder begin)
begin - The buffer to be completed with the specific fieldsprotected void embedFont()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||