org.apache.batik.gvt.font
Class HKernTable

java.lang.Object
  |
  +--org.apache.batik.gvt.font.HKernTable

public class HKernTable
extends java.lang.Object

The HKernTable class holds a kerning table (a collection of HKern elements). It provides a more convenient method of looking up kerning values when laying out glyphs.


Constructor Summary
HKernTable(HKern[] entries)
          Create an HKernTable from an array of HKern entries.
 
Method Summary
 float getKerningValue(char character1, char character2)
          Returns the amount of kerning that should be added between the given characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HKernTable

public HKernTable(HKern[] entries)
Create an HKernTable from an array of HKern entries.
Parameters:
entries - The array of HKern elements that represent the kerning entries for the font that this kerning table is associated with.
Method Detail

getKerningValue

public float getKerningValue(char character1,
                             char character2)
Returns the amount of kerning that should be added between the given characters. Returns 0 if the characters should not be kerned.
Parameters:
character1 - The first character in the kerning pair
character2 - The second character in the kerning pair
Returns:
The amount of kerning to be added when laying out the characters.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.