ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class Type1Font

java.lang.Object
  extended bycom.elegantj.pdf.PDFObject
      extended bycom.elegantj.pdf.PDFFont
          extended bycom.elegantj.pdf.Type1Font

public class Type1Font
extends PDFFont

Provides the Type1Font for the PDF


Field Summary
static java.lang.String COURIER
          Base 14 type 1 font
static java.lang.String COURIER_BOLD
          Base 14 type 1 font
static java.lang.String COURIER_BOLDOBLIQUE
          Base 14 type 1 font
static java.lang.String COURIER_OBLIQUE
          Base 14 type 1 font
static java.lang.String HELVETICA
          Base 14 type 1 font
static java.lang.String HELVETICA_BOLD
          Base 14 type 1 font
static java.lang.String HELVETICA_BOLDOBLIQUE
          Base 14 type 1 font
static java.lang.String HELVETICA_OBLIQUE
          Base 14 type 1 font
static java.lang.String SYMBOL
          Base 14 type 1 font
static java.lang.String TIMES_BOLD
          Base 14 type 1 font
static java.lang.String TIMES_BOLDITALIC
          Base 14 type 1 font
static java.lang.String TIMES_ITALIC
          Base 14 type 1 font
static java.lang.String TIMES_ROMAN
          Base 14 type 1 font
static java.lang.String ZAPFDINGBATS
          Base 14 type 1 font
 
Fields inherited from class com.elegantj.pdf.PDFFont
BOLD, BOLDITALIC, IDENTITY_H, IDENTITY_V, ITALIC, MACROMAN, REGULAR, WINANSI
 
Constructor Summary
Type1Font(java.lang.String baseFontName, java.lang.String encoding)
          Constructs the Type1Font with the specified baseFontName and encoding
Type1Font(java.lang.String afmFilePath, java.lang.String pfbFilePath, java.lang.String encoding)
          Constructs the Type1Font with specified afmFilePath, pfbFilePath and encoding
 
Method Summary
 float getAscender(float fontSize)
          Returns the maximum height above the baseline reached by characters in this font
 float getBBoxLowerLeftX(float fontSize)
          Returns the fontís bounding box's lower left X coordinate
 float getBBoxLowerLeftY(float fontSize)
          Returns the fontís bounding box's lower left Y coordinate
 float getBBoxUpperRightX(float fontSize)
          Returns the fontís bounding box's upper right X coordinate
 float getBBoxUpperRightY(float fontSize)
          Returns the fontís bounding box's upper right Y coordinate
 float getCapHeight(float fontSize)
          Returns the Y-coordinate of the top of flat capital letters, measured from the baseline
 float getDescender(float fontSize)
          Returns the maximum depth below the baseline reached by characters in this font Descent is a negative number
 float getItalicAngle()
          Returns the angle in degrees counterclockwise from the vertical of the dominant vertical strokes of the font.
 float getLeading()
          Returns the desired spacing between lines of text
 
Methods inherited from class com.elegantj.pdf.PDFFont
getCharWidth, getCharWidth, getStringWidth, getStringWidth
 
Methods inherited from class com.elegantj.pdf.PDFObject
getPDFObjectID, getPDFObjectRefStr, getPDFObjectType, setPDFObjectID, setPDFObjectType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COURIER

public static final java.lang.String COURIER
Base 14 type 1 font

See Also:
Constant Field Values

COURIER_BOLD

public static final java.lang.String COURIER_BOLD
Base 14 type 1 font

See Also:
Constant Field Values

COURIER_OBLIQUE

public static final java.lang.String COURIER_OBLIQUE
Base 14 type 1 font

See Also:
Constant Field Values

COURIER_BOLDOBLIQUE

public static final java.lang.String COURIER_BOLDOBLIQUE
Base 14 type 1 font

See Also:
Constant Field Values

HELVETICA

public static final java.lang.String HELVETICA
Base 14 type 1 font

See Also:
Constant Field Values

HELVETICA_BOLD

public static final java.lang.String HELVETICA_BOLD
Base 14 type 1 font

See Also:
Constant Field Values

HELVETICA_OBLIQUE

public static final java.lang.String HELVETICA_OBLIQUE
Base 14 type 1 font

See Also:
Constant Field Values

HELVETICA_BOLDOBLIQUE

public static final java.lang.String HELVETICA_BOLDOBLIQUE
Base 14 type 1 font

See Also:
Constant Field Values

SYMBOL

public static final java.lang.String SYMBOL
Base 14 type 1 font

See Also:
Constant Field Values

TIMES_ROMAN

public static final java.lang.String TIMES_ROMAN
Base 14 type 1 font

See Also:
Constant Field Values

TIMES_BOLD

public static final java.lang.String TIMES_BOLD
Base 14 type 1 font

See Also:
Constant Field Values

TIMES_ITALIC

public static final java.lang.String TIMES_ITALIC
Base 14 type 1 font

See Also:
Constant Field Values

TIMES_BOLDITALIC

public static final java.lang.String TIMES_BOLDITALIC
Base 14 type 1 font

See Also:
Constant Field Values

ZAPFDINGBATS

public static final java.lang.String ZAPFDINGBATS
Base 14 type 1 font

See Also:
Constant Field Values
Constructor Detail

Type1Font

public Type1Font(java.lang.String baseFontName,
                 java.lang.String encoding)
Constructs the Type1Font with the specified baseFontName and encoding

Parameters:
baseFontName - The specified base Font name Possible values are COURIER, COURIER_BOLD, COURIER_OBLIQUE, COURIER_BOLDOBLIQUE, HELVETICA, HELVETICA_BOLD, HELVETICA_OBLIQUE, HELVETICA_BOLDOBLIQUE, SYMBOL, TIMES_ROMAN, TIMES_BOLD, TIMES_ITALIC, TIMES_BOLDITALIC, ZAPFDINGBATS
encoding - the specified encoding for the Type1Font

Type1Font

public Type1Font(java.lang.String afmFilePath,
                 java.lang.String pfbFilePath,
                 java.lang.String encoding)
          throws java.lang.Exception,
                 java.io.IOException
Constructs the Type1Font with specified afmFilePath, pfbFilePath and encoding

Parameters:
afmFilePath - The path of the afm file
pfbFilePath - The path of the pfb file
encoding - The encoding for the font
Method Detail

getAscender

public float getAscender(float fontSize)
Returns the maximum height above the baseline reached by characters in this font

Overrides:
getAscender in class PDFFont
Parameters:
fontSize - The specified font size
Returns:
Ascender for the specified font size

getCapHeight

public float getCapHeight(float fontSize)
Returns the Y-coordinate of the top of flat capital letters, measured from the baseline

Overrides:
getCapHeight in class PDFFont
Parameters:
fontSize - The specified font size
Returns:
CapHeight for the specified font size

getDescender

public float getDescender(float fontSize)
Returns the maximum depth below the baseline reached by characters in this font Descent is a negative number

Overrides:
getDescender in class PDFFont
Parameters:
fontSize - The specified font size
Returns:
Descender for the specified font size

getItalicAngle

public float getItalicAngle()
Returns the angle in degrees counterclockwise from the vertical of the dominant vertical strokes of the font. ItalicAngle is negative for fonts that slope to the right, as almost all italic fonts do

Overrides:
getItalicAngle in class PDFFont

getBBoxLowerLeftX

public float getBBoxLowerLeftX(float fontSize)
Returns the fontís bounding box's lower left X coordinate

Overrides:
getBBoxLowerLeftX in class PDFFont
Parameters:
fontSize - The specified font size
Returns:
Font Bounding box's lower left X for the specified font size

getBBoxLowerLeftY

public float getBBoxLowerLeftY(float fontSize)
Returns the fontís bounding box's lower left Y coordinate

Overrides:
getBBoxLowerLeftY in class PDFFont
Parameters:
fontSize - The specified font size
Returns:
Font Bounding box's lower left Y for the specified font size

getBBoxUpperRightX

public float getBBoxUpperRightX(float fontSize)
Returns the fontís bounding box's upper right X coordinate

Overrides:
getBBoxUpperRightX in class PDFFont
Parameters:
fontSize - The specified font size
Returns:
Font Bounding box's upper right X for the specified font size

getBBoxUpperRightY

public float getBBoxUpperRightY(float fontSize)
Returns the fontís bounding box's upper right Y coordinate

Overrides:
getBBoxUpperRightY in class PDFFont
Parameters:
fontSize - The specified font size
Returns:
Font Bounding box's upper right Y for the specified font size

getLeading

public float getLeading()
Returns the desired spacing between lines of text

Overrides:
getLeading in class PDFFont

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.