de.dante.extex.font
Class GlyphImpl

java.lang.Object
  extended byde.dante.extex.font.GlyphImpl
All Implemented Interfaces:
Glyph, java.io.Serializable

public class GlyphImpl
extends java.lang.Object
implements Glyph, java.io.Serializable

GlyphImplementation

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

Constructor Summary
GlyphImpl()
          Create a new object.
GlyphImpl(Dimen h, Dimen d, Dimen w, Dimen i)
          Create a new object.
 
Method Summary
 void addKerning(Kerning kern)
          Add kerning for the glyph.
 void addLigature(Ligature lig)
          Add ligature for the glyph.
 Dimen getDepth()
          depth
 FontByteArray getExternalFile()
           
 Dimen getHeight()
           
 Dimen getItalicCorrection()
           
 Dimen getKerning(UnicodeChar uc)
          Return the kerning for the glyph.
 Dimen getLeftSpace()
           
 UnicodeChar getLigature(UnicodeChar uc)
          Return the ligature as UnicodeChar, or null, if no ligature exists.
 java.lang.String getName()
           
 java.lang.String getNumber()
           
 Dimen getRightSpace()
           
 Dimen getWidth()
           
 void setDepth(Dimen d)
           
 void setExternalFile(FontByteArray file)
           
 void setHeight(Dimen h)
           
 void setItalicCorrection(Dimen d)
           
 void setLeftSpace(Dimen ls)
           
 void setName(java.lang.String n)
           
 void setNumber(java.lang.String nr)
           
 void setRightSpace(Dimen rs)
           
 void setWidth(Dimen w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlyphImpl

public GlyphImpl()
Create a new object.


GlyphImpl

public GlyphImpl(Dimen h,
                 Dimen d,
                 Dimen w,
                 Dimen i)
Create a new object.

Parameters:
h - the hight
d - the depth
w - the width
i - the italic
Method Detail

getDepth

public Dimen getDepth()
Description copied from interface: Glyph
depth

Specified by:
getDepth in interface Glyph
Returns:
Returns the depth.

setDepth

public void setDepth(Dimen d)
Specified by:
setDepth in interface Glyph
Parameters:
d - The depth to set.

getHeight

public Dimen getHeight()
Specified by:
getHeight in interface Glyph
Returns:
Returns the height.

setHeight

public void setHeight(Dimen h)
Specified by:
setHeight in interface Glyph
Parameters:
h - The height to set.

getItalicCorrection

public Dimen getItalicCorrection()
Specified by:
getItalicCorrection in interface Glyph
Returns:
Returns the italic.

setItalicCorrection

public void setItalicCorrection(Dimen d)
Specified by:
setItalicCorrection in interface Glyph
Parameters:
d - the italic to set.

getWidth

public Dimen getWidth()
Specified by:
getWidth in interface Glyph
Returns:
Returns the width.

setWidth

public void setWidth(Dimen w)
Specified by:
setWidth in interface Glyph
Parameters:
w - The width to set.

getName

public java.lang.String getName()
Specified by:
getName in interface Glyph
Returns:
Returns the name.

setName

public void setName(java.lang.String n)
Specified by:
setName in interface Glyph
Parameters:
n - The name to set.

getNumber

public java.lang.String getNumber()
Specified by:
getNumber in interface Glyph
Returns:
Returns the number.

setNumber

public void setNumber(java.lang.String nr)
Specified by:
setNumber in interface Glyph
Parameters:
nr - The number to set.

addKerning

public void addKerning(Kerning kern)
Add kerning for the glyph.

Specified by:
addKerning in interface Glyph
Parameters:
kern - the kerning

getKerning

public Dimen getKerning(UnicodeChar uc)
Return the kerning for the glyph.

Specified by:
getKerning in interface Glyph
Parameters:
uc - the following character
Returns:
the kerning-size as Dimen

addLigature

public void addLigature(Ligature lig)
Add ligature for the glyph.

Specified by:
addLigature in interface Glyph
Parameters:
lig - the ligature

getLigature

public UnicodeChar getLigature(UnicodeChar uc)
Return the ligature as UnicodeChar, or null, if no ligature exists. If you get a ligature-character, then you MUST call the method getligature() twice, if a ligature with more then two characters exist. (e.g. f - ff - ffl)

Specified by:
getLigature in interface Glyph
Parameters:
uc - the following character
Returns:
the ligature

getExternalFile

public FontByteArray getExternalFile()
Specified by:
getExternalFile in interface Glyph
Returns:
Returns the externalfile.

setExternalFile

public void setExternalFile(FontByteArray file)
Specified by:
setExternalFile in interface Glyph
Parameters:
file - The externalfile to set.

getLeftSpace

public Dimen getLeftSpace()
Specified by:
getLeftSpace in interface Glyph
Returns:
Returns the leftSpace.

setLeftSpace

public void setLeftSpace(Dimen ls)
Specified by:
setLeftSpace in interface Glyph
Parameters:
ls - The leftSpace to set.

getRightSpace

public Dimen getRightSpace()
Specified by:
getRightSpace in interface Glyph
Returns:
Returns the rightSpace.

setRightSpace

public void setRightSpace(Dimen rs)
Specified by:
setRightSpace in interface Glyph
Parameters:
rs - The rightSpace to set.