|
||||||||||
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.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 | |
---|---|
protected String |
basefont
the base font name (eg "Helvetica") |
protected Object |
encoding
the character encoding scheme used by the font. |
protected String |
fontname
the internal name for the font (eg "F1") |
static byte |
MMTYPE1
font subtype to be used as parameter to createFont() |
protected byte |
subtype
the font's subtype (as defined by the constants TYPE0, TYPE1, MMTYPE1, TYPE3, TRUETYPE) |
static byte |
TRUETYPE
font subtype to be used as parameter to createFont() |
protected static String[] |
TYPE_NAMES
font subtype names as output in the PDF |
static byte |
TYPE0
font subtype to be used as parameter to createFont() |
static byte |
TYPE1
font subtype to be used as parameter to createFont() |
static byte |
TYPE3
font subtype to be used as parameter to createFont() |
Fields inherited from class org.apache.fop.pdf.PDFObject |
---|
generation, number |
Constructor Summary | |
---|---|
PDFFont(int number,
String fontname,
byte subtype,
String basefont,
Object encoding)
create the /Font object |
Method Summary | |
---|---|
static PDFFont |
createFont(int number,
String fontname,
byte subtype,
String basefont,
Object encoding)
factory method with the basic parameters |
static PDFFont |
createFont(int number,
String fontname,
byte subtype,
String basefont,
Object encoding,
int firstChar,
int lastChar,
PDFArray widths,
PDFFontDescriptor descriptor)
factory method with the extended parameters for Type1, MMType1 and TrueType |
protected void |
fillInPDF(StringBuffer begin)
fill in the specifics for the font's subtype. |
String |
getName()
get the internal name used for this font |
byte[] |
toPDF()
produce the PDF representation for the object |
Methods inherited from class org.apache.fop.pdf.PDFObject |
---|
getNumber, output, referencePDF |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte TYPE0
public static final byte TYPE1
public static final byte MMTYPE1
public static final byte TYPE3
public static final byte TRUETYPE
protected static final String[] TYPE_NAMES
protected String fontname
protected byte subtype
protected String basefont
protected Object encoding
null
then not written out in the PDF.
Constructor Detail |
---|
public PDFFont(int number, String fontname, byte subtype, String basefont, Object encoding)
number
- the object's numberfontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontmapping
- the Unicode mapping mechanismMethod Detail |
---|
public static PDFFont createFont(int number, String fontname, byte subtype, String basefont, Object encoding)
number
- the object's numberfontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontpublic static PDFFont createFont(int number, String fontname, byte subtype, String basefont, Object encoding, int firstChar, int lastChar, PDFArray widths, PDFFontDescriptor descriptor)
number
- the object's numberfontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontfirstChar
- the first character code in the fontlastChar
- the last character code in the fontwidths
- an array of size (lastChar - firstChar +1)descriptor
- the descriptor for other font's metricspublic String getName()
public byte[] toPDF()
protected void fillInPDF(StringBuffer begin)
begin
- the buffer to be completed with the type specific fields
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |