org.apache.fop.fonts.type1

Class AFMCharMetrics


public class AFMCharMetrics
extends java.lang.Object

Holds the metrics of a single character from an AFM file.

Method Summary

RectangularShape
getBBox()
Returns the character's bounding box.
int
getCharCode()
Returns the character code.
String
getCharName()
Returns the PostScript character name.
String
getUnicodeSequence()
Returns the Unicode sequence for this character.
double
getWidthX()
Returns the progression dimension in x-direction.
double
getWidthY()
Returns the progression dimension in y-direction.
boolean
hasCharCode()
Indicates whether the character has a character code, i.e.
void
setBBox(RectangularShape box)
Sets the character's bounding box.
void
setCharCode(int charCode)
Sets the character code.
void
setCharName(String charName)
Sets the PostScript character name.
void
setUnicodeSequence(String unicodeSequence)
Sets the Unicode sequence for this character.
void
setWidthX(double widthX)
Sets the progression dimension in x-direction
void
setWidthY(double widthY)
Sets the progression dimension in y-direction
String
toString()

Method Details

getBBox

public RectangularShape getBBox()
Returns the character's bounding box.
Returns:
the bounding box (or null if it isn't available)

getCharCode

public int getCharCode()
Returns the character code.
Returns:
the charCode (-1 if not part of the encoding)

getCharName

public String getCharName()
Returns the PostScript character name.
Returns:
the charName

getUnicodeSequence

public String getUnicodeSequence()
Returns the Unicode sequence for this character.
Returns:
the Unicode characters (or null if no such Unicode sequence exists for this character)

getWidthX

public double getWidthX()
Returns the progression dimension in x-direction.
Returns:
the widthX

getWidthY

public double getWidthY()
Returns the progression dimension in y-direction.
Returns:
the widthY

hasCharCode

public boolean hasCharCode()
Indicates whether the character has a character code, i.e. is part of the default encoding.
Returns:
true if there is a character code.

setBBox

public void setBBox(RectangularShape box)
Sets the character's bounding box.
Parameters:
box - the bounding box

setCharCode

public void setCharCode(int charCode)
Sets the character code.
Parameters:
charCode - the charCode to set

setCharName

public void setCharName(String charName)
Sets the PostScript character name.
Parameters:
charName - the charName to set

setUnicodeSequence

public void setUnicodeSequence(String unicodeSequence)
Sets the Unicode sequence for this character.
Parameters:
unicodeSequence - the Unicode sequence

setWidthX

public void setWidthX(double widthX)
Sets the progression dimension in x-direction
Parameters:
widthX - the widthX to set

setWidthY

public void setWidthY(double widthY)
Sets the progression dimension in y-direction
Parameters:
widthY - the widthY to set

toString

public String toString()

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.