Class BaseFontFontMetrics
- java.lang.Object
-
- org.pentaho.reporting.libraries.fonts.itext.BaseFontFontMetrics
-
- All Implemented Interfaces:
FontMetrics
public class BaseFontFontMetrics extends Object implements FontMetrics
Creation-Date: 22.07.2007, 19:04:00- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description BaseFontFontMetrics(FontNativeContext record, com.lowagie.text.pdf.BaseFont baseFont, float size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAscent()The font ascent is the distance from the font's baseline to the top of most alphanumeric characters.com.lowagie.text.pdf.BaseFontgetBaseFont()BaselineInfogetBaselines(int c, BaselineInfo info)Baselines are defined for scripts, not glyphs.longgetCharWidth(int character)longgetDescent()The font descent is the distance from the font's baseline to the bottom of most alphanumeric characters.longgetItalicAngle()longgetKerning(int previous, int codePoint)longgetLeading()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.longgetMaxAscent()longgetMaxCharAdvance()longgetMaxDescent()longgetMaxHeight()FontNativeContextgetNativeContext()longgetOverlinePosition()longgetStrikeThroughPosition()longgetUnderlinePosition()longgetXHeight()The height of the lowercase 'x'.booleanisTrueTypeFont()booleanisUniformFontMetrics()Is it guaranteed that the font always returns the same baseline info objct?
-
-
-
Constructor Detail
-
BaseFontFontMetrics
public BaseFontFontMetrics(FontNativeContext record, com.lowagie.text.pdf.BaseFont baseFont, float size)
-
-
Method Detail
-
isTrueTypeFont
public boolean isTrueTypeFont()
-
getAscent
public long getAscent()
Description copied from interface:FontMetricsThe 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:
getAscentin interfaceFontMetrics- Returns:
- the ascent.
-
getDescent
public long getDescent()
Description copied from interface:FontMetricsThe 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:
getDescentin interfaceFontMetrics- Returns:
- the descent.
-
getLeading
public long getLeading()
Description copied from interface:FontMetricsThe 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:
getLeadingin interfaceFontMetrics- Returns:
- the leading.
-
getXHeight
public long getXHeight()
Description copied from interface:FontMetricsThe height of the lowercase 'x'. This is used as hint, which size the lowercase characters will have.- Specified by:
getXHeightin interfaceFontMetrics- Returns:
-
getOverlinePosition
public long getOverlinePosition()
- Specified by:
getOverlinePositionin interfaceFontMetrics
-
getUnderlinePosition
public long getUnderlinePosition()
- Specified by:
getUnderlinePositionin interfaceFontMetrics
-
getStrikeThroughPosition
public long getStrikeThroughPosition()
- Specified by:
getStrikeThroughPositionin interfaceFontMetrics
-
getItalicAngle
public long getItalicAngle()
- Specified by:
getItalicAnglein interfaceFontMetrics
-
getMaxAscent
public long getMaxAscent()
- Specified by:
getMaxAscentin interfaceFontMetrics
-
getMaxDescent
public long getMaxDescent()
- Specified by:
getMaxDescentin interfaceFontMetrics
-
getMaxHeight
public long getMaxHeight()
- Specified by:
getMaxHeightin interfaceFontMetrics
-
getMaxCharAdvance
public long getMaxCharAdvance()
- Specified by:
getMaxCharAdvancein interfaceFontMetrics
-
getCharWidth
public long getCharWidth(int character)
- Specified by:
getCharWidthin interfaceFontMetrics
-
getKerning
public long getKerning(int previous, int codePoint)- Specified by:
getKerningin interfaceFontMetrics
-
isUniformFontMetrics
public boolean isUniformFontMetrics()
Is it guaranteed that the font always returns the same baseline info objct?- Specified by:
isUniformFontMetricsin interfaceFontMetrics- 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:FontMetricsBaselines 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:
getBaselinesin interfaceFontMetrics- Returns:
-
getBaseFont
public com.lowagie.text.pdf.BaseFont getBaseFont()
-
getNativeContext
public FontNativeContext getNativeContext()
- Specified by:
getNativeContextin interfaceFontMetrics
-
-