org.pentaho.reporting.libraries.fonts.itext
Class BaseFontFontMetrics

java.lang.Object
  extended by org.pentaho.reporting.libraries.fonts.itext.BaseFontFontMetrics
All Implemented Interfaces:
FontMetrics

public class BaseFontFontMetrics
extends java.lang.Object
implements FontMetrics

Creation-Date: 22.07.2007, 19:04:00

Author:
Thomas Morgner

Constructor Summary
BaseFontFontMetrics(BaseFont baseFont, float size)
           
 
Method Summary
 long getAscent()
          The font ascent is the distance from the font's baseline to the top of most alphanumeric characters.
 BaseFont getBaseFont()
           
 BaselineInfo getBaselines(int c, BaselineInfo info)
          Baselines are defined for scripts, not glyphs.
 long getCharWidth(int character)
           
 long getDescent()
          The font descent is the distance from the font's baseline to the bottom of most alphanumeric characters.
 long getItalicAngle()
           
 long getKerning(int previous, int codePoint)
           
 long getLeading()
          The standard leading, or interline spacing, is the logical amount of space to be reserved between the descent of one line of text and the ascent of the next line.
 long getMaxAscent()
           
 long getMaxCharAdvance()
           
 long getMaxDescent()
           
 long getMaxHeight()
           
 long getOverlinePosition()
           
 long getStrikeThroughPosition()
           
 long getUnderlinePosition()
           
 long getXHeight()
          The height of the lowercase 'x'.
 boolean isTrueTypeFont()
           
 boolean isUniformFontMetrics()
          Is it guaranteed that the font always returns the same baseline info objct?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFontFontMetrics

public BaseFontFontMetrics(BaseFont baseFont,
                           float size)
Method Detail

isTrueTypeFont

public boolean isTrueTypeFont()

getAscent

public long getAscent()
Description copied from interface: FontMetrics
The font ascent is the distance from the font's baseline to the top of most alphanumeric characters. The ascent is always a positive number.

Specified by:
getAscent in interface FontMetrics
Returns:
the ascent.

getDescent

public long getDescent()
Description copied from interface: FontMetrics
The font descent is the distance from the font's baseline to the bottom of most alphanumeric characters. The descent is always a positive number.

Specified by:
getDescent in interface FontMetrics
Returns:
the descent.

getLeading

public long getLeading()
Description copied from interface: FontMetrics
The standard leading, or interline spacing, is the logical amount of space to be reserved between the descent of one line of text and the ascent of the next line. The height metric is calculated to include this extra space. The leading is always a positive number.

Specified by:
getLeading in interface FontMetrics
Returns:
the leading.

getXHeight

public long getXHeight()
Description copied from interface: FontMetrics
The height of the lowercase 'x'. This is used as hint, which size the lowercase characters will have.

Specified by:
getXHeight in interface FontMetrics
Returns:

getOverlinePosition

public long getOverlinePosition()
Specified by:
getOverlinePosition in interface FontMetrics

getUnderlinePosition

public long getUnderlinePosition()
Specified by:
getUnderlinePosition in interface FontMetrics

getStrikeThroughPosition

public long getStrikeThroughPosition()
Specified by:
getStrikeThroughPosition in interface FontMetrics

getItalicAngle

public long getItalicAngle()
Specified by:
getItalicAngle in interface FontMetrics

getMaxAscent

public long getMaxAscent()
Specified by:
getMaxAscent in interface FontMetrics

getMaxDescent

public long getMaxDescent()
Specified by:
getMaxDescent in interface FontMetrics

getMaxHeight

public long getMaxHeight()
Specified by:
getMaxHeight in interface FontMetrics

getMaxCharAdvance

public long getMaxCharAdvance()
Specified by:
getMaxCharAdvance in interface FontMetrics

getCharWidth

public long getCharWidth(int character)
Specified by:
getCharWidth in interface FontMetrics

getKerning

public long getKerning(int previous,
                       int codePoint)
Specified by:
getKerning in interface FontMetrics

isUniformFontMetrics

public boolean isUniformFontMetrics()
Is it guaranteed that the font always returns the same baseline info objct?

Specified by:
isUniformFontMetrics in interface FontMetrics
Returns:
true, if the baseline info in question is always the same, false otherwise.

getBaselines

public BaselineInfo getBaselines(int c,
                                 BaselineInfo info)
Description copied from interface: FontMetrics
Baselines are defined for scripts, not glyphs. A glyph carries script information most of the time (unless it is a neutral characters or just weird).

Specified by:
getBaselines in interface FontMetrics
Returns:

getBaseFont

public BaseFont getBaseFont()