org.pentaho.reporting.libraries.fonts.registry

Class EmptyFontMetrics

public class EmptyFontMetrics extends Object implements FontMetrics

An placeholder metrics for buggy fonts.

Author: Thomas Morgner

Constructor Summary
EmptyFontMetrics(double baseWidth, double baseHeight)
EmptyFontMetrics(long baseWidth, long baseHeight)
Method Summary
longgetAscent()
From the baseline to the
BaselineInfogetBaselines(int c, BaselineInfo info)
Baselines are defined for scripts, not glyphs.
longgetCharWidth(int codePoint)
longgetDescent()
longgetItalicAngle()
longgetKerning(int previous, int codePoint)
longgetLeading()
longgetMaxAscent()
longgetMaxCharAdvance()
longgetMaxDescent()
longgetMaxHeight()
longgetOverlinePosition()
longgetStrikeThroughPosition()
longgetUnderlinePosition()
longgetXHeight()
The height of the lowercase 'x'.
booleanisUniformFontMetrics()
Is it guaranteed that the font always returns the same baseline info objct?

Constructor Detail

EmptyFontMetrics

public EmptyFontMetrics(double baseWidth, double baseHeight)

EmptyFontMetrics

public EmptyFontMetrics(long baseWidth, long baseHeight)

Method Detail

getAscent

public long getAscent()
From the baseline to the

Returns:

getBaselines

public BaselineInfo getBaselines(int c, BaselineInfo info)
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).

Parameters: c

Returns:

getCharWidth

public long getCharWidth(int codePoint)

getDescent

public long getDescent()

getItalicAngle

public long getItalicAngle()

getKerning

public long getKerning(int previous, int codePoint)

getLeading

public long getLeading()

getMaxAscent

public long getMaxAscent()

getMaxCharAdvance

public long getMaxCharAdvance()

getMaxDescent

public long getMaxDescent()

getMaxHeight

public long getMaxHeight()

getOverlinePosition

public long getOverlinePosition()

getStrikeThroughPosition

public long getStrikeThroughPosition()

getUnderlinePosition

public long getUnderlinePosition()

getXHeight

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

Returns:

isUniformFontMetrics

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

Returns: true, if the baseline info in question is always the same, false otherwise.