|
||||||||||
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.PDFFont
public class PDFFont
A /Font object in PDF.
This class wraps an instance of FontPdf
(a font from the font system), providing additional services to the
PDF processor.
Fonts are specified on page 198 and onwards of the PDF 1.3 spec.
Nested Class Summary | |
---|---|
static class |
PDFFont.SubType
Enumeration of the various font subtypes possible in a PDF document. |
Field Summary |
---|
Fields inherited from class org.foray.pdf.object.PDFObject |
---|
EOL, MSG_EOL, XREF_EOL |
Constructor Summary | |
---|---|
PDFFont(PDFDocument doc,
org.axsl.font.output.FontPdf fsFont)
Create the /Font object. |
Method Summary | |
---|---|
String |
getBaseFont()
Return the PostScript name for this font. |
protected PDFCIDFont |
getDescendantFonts()
Returns the descendant fonts. |
PDFFontDescriptor |
getDescriptor()
Returs the font descriptor for this font. |
org.axsl.font.output.FontPdf |
getFont()
Return the underlying font instance. |
PDFFont.SubType |
getFontSubtype()
Returns the subtype for this font. |
static PDFFont.SubType |
getFontSubtype(org.axsl.font.output.FontPdf font)
Return the font subtype. |
org.axsl.font.FontUse |
getFsFont()
Return the font-system font wrapped by this PDF font. |
String |
getName()
|
protected PDFToUnicodeCMap |
getToUnicodeCMAP()
Returns the ToUnicode CMap for this font. |
static PDFFont |
makeFont(PDFDocument pdfDoc,
org.axsl.font.output.FontPdf fsFont)
Create a PDFFont with the next object number and add it to the list of objects. |
String |
toPDF()
Generates the PDF text necessary to represent the object, returning it as a String. |
protected void |
writeFirstChar(StringBuilder buffer)
Write the /FirstChar component of the font entry. |
protected void |
writeFontDescriptor(StringBuilder buffer)
Write the /FontDescriptor component of the font entry. |
protected void |
writeLastChar(StringBuilder buffer)
Write the /LastChar component of the font entry. |
protected void |
writeWidths(StringBuilder buffer)
Write the /Widths component of the font entry. |
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 PDFFont(PDFDocument doc, org.axsl.font.output.FontPdf fsFont)
doc
- The parent PDF document.fsFont
- The FreeStandingFont which is the basis for this PDF Font.Method Detail |
---|
public static PDFFont makeFont(PDFDocument pdfDoc, org.axsl.font.output.FontPdf fsFont)
pdfDoc
- The parent PDF document.fsFont
- The FreeStandingFont to be added
public String getName()
getName
in interface org.axsl.pdf.PdfFont
public String getBaseFont()
public String toPDF()
PDFObject
protected void writeFirstChar(StringBuilder buffer)
buffer
- The buffer into which the component should be written.protected void writeLastChar(StringBuilder buffer)
buffer
- The buffer into which the component should be written.protected void writeWidths(StringBuilder buffer)
buffer
- The buffer into which the component should be written.protected void writeFontDescriptor(StringBuilder buffer)
buffer
- The buffer into which the component should be written.protected PDFToUnicodeCMap getToUnicodeCMAP()
protected PDFCIDFont getDescendantFonts()
public static PDFFont.SubType getFontSubtype(org.axsl.font.output.FontPdf font)
font
- The Font whose PDF subtype is needed.
public PDFFont.SubType getFontSubtype()
public org.axsl.font.FontUse getFsFont()
public org.axsl.font.output.FontPdf getFont()
getFont
in interface org.axsl.pdf.PdfFont
public PDFFontDescriptor getDescriptor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |