Package com.orsonpdf
Class PDFFont
- java.lang.Object
-
- com.orsonpdf.PDFObject
-
- com.orsonpdf.PDFFont
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbaseFontThe BaseFont (for example, "/Helvetica").static java.lang.StringCOURIERIdentifier for the standard PDF font 'Courier'.static java.lang.StringCOURIER_BOLDIdentifier for the standard PDF font 'Courier-Bold'.static java.lang.StringCOURIER_BOLDITALICIdentifier for the standard PDF font 'Courier-BoldItalic'.static java.lang.StringCOURIER_ITALICIdentifier for the standard PDF font 'Courier-Italic'.private java.lang.Stringencodingstatic java.lang.StringHELVETICAIdentifier for the standard PDF font 'Helvetica'.static java.lang.StringHELVETICA_BOLDIdentifier for the standard PDF font 'Helvetica-Bold'.static java.lang.StringHELVETICA_BOLDOBLIQUEIdentifier for the standard PDF font 'Helvetica-BoldOblique'.static java.lang.StringHELVETICA_OBLIQUEIdentifier for the standard PDF font 'Helvetica-Oblique'.private java.lang.Stringnamestatic java.lang.StringTIMES_BOLDIdentifier for the standard PDF font 'Times-Bold'.static java.lang.StringTIMES_BOLDITALICIdentifier for the standard PDF font 'Times-BoldItalic'.static java.lang.StringTIMES_ITALICIdentifier for the standard PDF font 'Times-Italic'.static java.lang.StringTIMES_ROMANIdentifier for the standard PDF font 'Times-Roman'.
-
Constructor Summary
Constructors Constructor Description PDFFont(int number, int generation, java.lang.String name, java.lang.String baseFont, java.lang.String encoding)Creates a newPDFFontinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private DictionarycreateDictionary()java.lang.StringgetName()Returns the name of the font within the PDF document (this is not the same as the font name).byte[]getObjectBytes()Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.-
Methods inherited from class com.orsonpdf.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
-
-
-
Field Detail
-
HELVETICA
public static final java.lang.String HELVETICA
Identifier for the standard PDF font 'Helvetica'.- See Also:
- Constant Field Values
-
HELVETICA_BOLD
public static final java.lang.String HELVETICA_BOLD
Identifier for the standard PDF font 'Helvetica-Bold'.- See Also:
- Constant Field Values
-
HELVETICA_OBLIQUE
public static final java.lang.String HELVETICA_OBLIQUE
Identifier for the standard PDF font 'Helvetica-Oblique'.- See Also:
- Constant Field Values
-
HELVETICA_BOLDOBLIQUE
public static final java.lang.String HELVETICA_BOLDOBLIQUE
Identifier for the standard PDF font 'Helvetica-BoldOblique'.- See Also:
- Constant Field Values
-
TIMES_ROMAN
public static final java.lang.String TIMES_ROMAN
Identifier for the standard PDF font 'Times-Roman'.- See Also:
- Constant Field Values
-
TIMES_BOLD
public static final java.lang.String TIMES_BOLD
Identifier for the standard PDF font 'Times-Bold'.- See Also:
- Constant Field Values
-
TIMES_ITALIC
public static final java.lang.String TIMES_ITALIC
Identifier for the standard PDF font 'Times-Italic'.- See Also:
- Constant Field Values
-
TIMES_BOLDITALIC
public static final java.lang.String TIMES_BOLDITALIC
Identifier for the standard PDF font 'Times-BoldItalic'.- See Also:
- Constant Field Values
-
COURIER
public static final java.lang.String COURIER
Identifier for the standard PDF font 'Courier'.- See Also:
- Constant Field Values
-
COURIER_BOLD
public static final java.lang.String COURIER_BOLD
Identifier for the standard PDF font 'Courier-Bold'.- See Also:
- Constant Field Values
-
COURIER_ITALIC
public static final java.lang.String COURIER_ITALIC
Identifier for the standard PDF font 'Courier-Italic'.- See Also:
- Constant Field Values
-
COURIER_BOLDITALIC
public static final java.lang.String COURIER_BOLDITALIC
Identifier for the standard PDF font 'Courier-BoldItalic'.- See Also:
- Constant Field Values
-
name
private java.lang.String name
-
baseFont
private java.lang.String baseFont
The BaseFont (for example, "/Helvetica").
-
encoding
private java.lang.String encoding
-
-
Constructor Detail
-
PDFFont
PDFFont(int number, int generation, java.lang.String name, java.lang.String baseFont, java.lang.String encoding)Creates a newPDFFontinstance.- Parameters:
number- the PDF object number.generation- the PDF object generation number.name- the font name within the PDF document.baseFont- the base font name.encoding- the encoding.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the font within the PDF document (this is not the same as the font name).- Returns:
- The font name.
-
getObjectBytes
public byte[] getObjectBytes()
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytesin classPDFObject- Returns:
- A byte array.
-
createDictionary
private Dictionary createDictionary()
-
-