org.extex.font.format.afm
Class AfmCharMetric

java.lang.Object
  extended by org.extex.font.format.afm.AfmCharMetric
All Implemented Interfaces:
java.io.Serializable

public class AfmCharMetric
extends java.lang.Object
implements java.io.Serializable

Class for the AFM CharMetric.

Version:
$Revision: 5837 $
Author:
Michael Niedermair
See Also:
Serialized Form

Constructor Summary
AfmCharMetric()
           
 
Method Summary
 void addK(AfmKernPairs kp)
          Add a kerning.
 void addL(java.lang.String letter, java.lang.String lig)
          Add a ligature.
 AfmKernPairs getAfmKernPair(java.lang.String charpost)
          Returns a kerning pair for a letter, or null, if no kerning is found.
 float getBllx()
          Returns the bllx.
 float getBlly()
          Returns the blly.
 float getBurx()
          Returns the burx.
 float getBury()
          Returns the bury.
 int getC()
          Returns the c.
 float getDepth()
          Returns the depth of a glyph.
 float getHeight()
          Returns the height of a glyph.
 java.util.List<AfmKernPairs> getK()
          Returns the kerning.
 java.util.Map<java.lang.String,java.lang.String> getL()
          Returns the l.
 java.lang.String getLigature(java.lang.String letter)
          Returns the ligature for a letter or null, if no ligature found.
 java.lang.String getN()
          Returns the n.
 float getWidth()
          Returns the width of a glyph.
 float getWx()
          Returns the wx.
 boolean isKerning()
          Check, if the char has a kerning.
 boolean isLigatur()
          Check, if the char has a ligature.
 void setBllx(float ibllx)
          Set the bllx.
 void setBlly(float iblly)
          Set the blly.
 void setBurx(float iburx)
          Set the burx.
 void setBury(float ibury)
          Set the bury.
 void setC(int ic)
          Set the c.
 void setN(java.lang.String s)
          Set the n.
 void setWx(float iwx)
          Set the wx.
 java.lang.String toString()
          Return the name and the number of the glyph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AfmCharMetric

public AfmCharMetric()
Method Detail

addK

public void addK(AfmKernPairs kp)
Add a kerning.

Parameters:
kp - The kerning pairs.

addL

public void addL(java.lang.String letter,
                 java.lang.String lig)
Add a ligature.

Parameters:
letter - the basic letter
lig - the ligature

getAfmKernPair

public AfmKernPairs getAfmKernPair(java.lang.String charpost)
Returns a kerning pair for a letter, or null, if no kerning is found.

Parameters:
charpost - The post character.
Returns:
Returns a kerning pair for a letter, or null, if no kerning is found.

getBllx

public float getBllx()
Returns the bllx.

Returns:
Returns the bllx.

getBlly

public float getBlly()
Returns the blly.

Returns:
Returns the blly.

getBurx

public float getBurx()
Returns the burx.

Returns:
Returns the burx.

getBury

public float getBury()
Returns the bury.

Returns:
Returns the bury.

getC

public int getC()
Returns the c.

Returns:
Returns the c.

getDepth

public float getDepth()
Returns the depth of a glyph.

Returns:
the depth of a glyph.

getHeight

public float getHeight()
Returns the height of a glyph.

Returns:
the height of a glyph.

getK

public java.util.List<AfmKernPairs> getK()
Returns the kerning.

Returns:
Returns the kerning.

getL

public java.util.Map<java.lang.String,java.lang.String> getL()
Returns the l.

Returns:
Returns the l.

getLigature

public java.lang.String getLigature(java.lang.String letter)
Returns the ligature for a letter or null, if no ligature found.

Parameters:
letter - The letter.
Returns:
Returns the ligature for a letter or null, if no ligature found.

getN

public java.lang.String getN()
Returns the n.

Returns:
Returns the n.

getWidth

public float getWidth()
Returns the width of a glyph.

Returns:
the width of a glyph.

getWx

public float getWx()
Returns the wx.

Returns:
Returns the wx.

isKerning

public boolean isKerning()
Check, if the char has a kerning.

Returns:
Return true, if the char has a kerning.

isLigatur

public boolean isLigatur()
Check, if the char has a ligature.

Returns:
Return true, if the char has a ligature.

setBllx

public void setBllx(float ibllx)
Set the bllx.

Parameters:
ibllx - The bllx to set.

setBlly

public void setBlly(float iblly)
Set the blly.

Parameters:
iblly - The blly to set.

setBurx

public void setBurx(float iburx)
Set the burx.

Parameters:
iburx - The burx to set.

setBury

public void setBury(float ibury)
Set the bury.

Parameters:
ibury - The bury to set.

setC

public void setC(int ic)
Set the c.

Parameters:
ic - The c to set.

setN

public void setN(java.lang.String s)
Set the n.

Parameters:
s - The n to set.

setWx

public void setWx(float iwx)
Set the wx.

Parameters:
iwx - The wx to set.

toString

public java.lang.String toString()
Return the name and the number of the glyph.

Overrides:
toString in class java.lang.Object
Returns:
Return the name and the number of the glyph.