DynamicPDF by ceTe Software

com.cete.dynamicpdf.text
Class Type1Font

java.lang.Object
  extended by com.cete.dynamicpdf.Resource
      extended by com.cete.dynamicpdf.Font
          extended by com.cete.dynamicpdf.text.Type1Font

public class Type1Font
extends Font

Represents a Type1Font font.

Licensing:
This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:


Constructor Summary
Type1Font(java.lang.String metricsFile, java.lang.String fontFile)
          Initializes a new instance of the Type1Font class.
 
Method Summary
 void draw(DocumentWriter writer)
          Draws the Type 1 font to the given DocumentWriter object.
 short getAscender()
          Gets the ascender for the font.
 short getDescender()
          Gets the descender for the font.
 int getGlyphWidth(char glyph)
          Returns the mwidth of a glyph.
 LineBreaker getLineBreaker()
          Gets the default line breaker for the font.
 short getLineGap()
          Gets the line gap for the font.
 java.lang.String getName()
          Gets the name of the font.
 int getRequiredPdfObjects()
          Gets the number of PDF objects required by the type 1 font.
 
Methods inherited from class com.cete.dynamicpdf.Font
getAscender, getBaseLine, getCeTeBullets, getCourier, getCourierBold, getCourierBoldOblique, getCourierOblique, getDefaultLeading, getDescender, getEncoder, getFormFontName, getHanyangSystemsGothicMedium, getHanyangSystemsShinMyeongJoMedium, getHeiseiKakuGothicW5, getHeiseiMinchoW3, getHelvetica, getHelveticaBold, getHelveticaBoldOblique, getHelveticaOblique, getKernValue, getLineGap, getMonotypeHeiMedium, getMonotypeSungLight, getResourceType, getSinoTypeSongLight, getSymbol, getTextLines, getTextLines, getTextWidth, getTextWidth, getTimesBold, getTimesBoldItalic, getTimesItalic, getTimesRoman, getZapfDingbats, hasKerning
 
Methods inherited from class com.cete.dynamicpdf.Resource
getUid, newUid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Type1Font

public Type1Font(java.lang.String metricsFile,
                 java.lang.String fontFile)
Initializes a new instance of the Type1Font class.

Parameters:
metricsFile - Physical file path to the .PFM or .AFM font metrics file.
fontFile - Physical file path to the Type 1 (.PFB) font file.
Method Detail

getRequiredPdfObjects

public int getRequiredPdfObjects()
Gets the number of PDF objects required by the type 1 font.

Overrides:
getRequiredPdfObjects in class Resource
Returns:
Number of PDF objects required by the type 1 font.

getGlyphWidth

public int getGlyphWidth(char glyph)
Returns the mwidth of a glyph.

Specified by:
getGlyphWidth in class Font
Parameters:
glyph - Glyph whose mwidth is to be returned.
Returns:
width of glyph.

getLineBreaker

public LineBreaker getLineBreaker()
Gets the default line breaker for the font.

Specified by:
getLineBreaker in class Font
Returns:
the default line breaker for the font.

getDescender

public short getDescender()
Gets the descender for the font.

Specified by:
getDescender in class Font
Returns:
the descender for the font.

getAscender

public short getAscender()
Gets the ascender for the font.

Specified by:
getAscender in class Font
Returns:
the ascender for the font.

getLineGap

public short getLineGap()
Gets the line gap for the font.

Overrides:
getLineGap in class Font
Returns:
the line gap for the font.

getName

public java.lang.String getName()
Gets the name of the font.

Specified by:
getName in class Font
Returns:
the name of the font.

draw

public void draw(DocumentWriter writer)
Draws the Type 1 font to the given DocumentWriter object.

Specified by:
draw in class Resource
Parameters:
writer - DocumentWriter object to receive the Type 1 font's output.
See Also:
DocumentWriter

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.04 for Java generated on September 25, 2019
© Copyright 2019, ceTe Software