org.apache.batik.gvt.font
Class KerningTable
java.lang.Object
org.apache.batik.gvt.font.KerningTable
- public class KerningTable
- extends java.lang.Object
The KerningTable class holds a kerning table (a collection of Kern
elements). It provides a more convenient method of looking up kerning values
when laying out glyphs.
- Version:
- $Id: KerningTable.java,v 1.4 2003/08/08 11:39:16 vhardy Exp $
- Author:
- Dean Jackson
|
Constructor Summary |
KerningTable(Kern[] entries)
Creates a KerningTable from an array of Kern entries. |
|
Method Summary |
float |
getKerningValue(int glyphCode1,
int glyphCode2,
java.lang.String glyphUnicode1,
java.lang.String glyphUnicode2)
Returns the amount of kerning that should be added between the given
glyphs. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KerningTable
public KerningTable(Kern[] entries)
- Creates a KerningTable from an array of Kern entries.
- Parameters:
entries - The array of Kern objects that represent the kerning
entries for the font that this kerning table belongs to.
getKerningValue
public float getKerningValue(int glyphCode1,
int glyphCode2,
java.lang.String glyphUnicode1,
java.lang.String glyphUnicode2)
- Returns the amount of kerning that should be added between the given
glyphs. Returns 0 if the glyphs should not be kerned.
- Parameters:
glyphCode1 - The id of the first glyph in the kerning pairglyphCode2 - The id of the second glyph in the kerning pairglyphUnicode1 - The unicode value of the first glyph in the kerning
pairglyphUnicode2 - The unicode vlaue of the second glyph in the kerning
pair
- Returns:
- The amount of kerning to be added when laying out the glyphs
<oXygen/>
XML Editor
uses Batik from the Apache Foundation
to provide support for previewing SVG documents.
See the SVG Editor section
for more info.