org.apache.fop.pdf
Class PDFFont
- PDFWritable
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.
PDFFont(String fontname, FontType subtype, String basefont, Object encoding) - create the /Font object
|
encode , encodeBinaryToHexString , encodeString , encodeText , formatDateTime , formatDateTime , formatObject , getDocument , getDocumentSafely , getGeneration , getObjectID , getObjectNumber , getParent , hasObjectNumber , makeReference , output , outputInline , referencePDF , setDocument , setObjectNumber , setParent , toPDF , toPDFString |
PDFFont
public PDFFont(String fontname,
FontType subtype,
String basefont,
Object encoding)
create the /Font object
fontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the font
createFont
public static PDFFont createFont(String fontname,
FontType subtype,
String basefont,
Object encoding)
factory method with the basic parameters
fontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the font
- the generated PDFFont object
getBaseFont
public PDFName getBaseFont()
Returns the name of the BaseFont.
getName
public String getName()
Get the internal name used for this font.
getPDFNameForFontType
protected PDFName getPDFNameForFontType(FontType fontType)
Returns the PDF name for a certain font type.
- String corresponding PDF name
output
protected int output(OutputStream stream)
throws IOException
- output in interface PDFDictionary
setEncoding
public void setEncoding(String encoding)
Sets the Encoding value of the font.
setEncoding
public void setEncoding(PDFEncoding encoding)
Sets the Encoding value of the font.
validate
protected void validate()
Validates the PDF object prior to serialization.
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.