|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.font.Kerning
public final class Kerning
Kerning is used to fine-tune the spacing between specific pairs of characters to make them visually more appealing.
The glyphs are identified by an index into the glyph table for the font. The adjustment, in twips, is specified relative to the advance define for the left hand glyph.
Kerning objects are only used within DefineFont2 objects and provide more precise control over the layout of a font's glyph than was possible using the DefineFont and FontInfo objects.
DefineFont2| Constructor Summary | |
|---|---|
Kerning(int leftIndex,
int rightIndex,
int adjust)
Creates a Kerning object specifying the glyph indexes and adjustment. |
|
Kerning(SWFDecoder coder,
Context context)
Creates and initialises a Kerning object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
boolean |
equals(Object object)
|
int |
getAdjustment()
Get the adjustment, in twips, to the advance of the left glyph. |
int |
getLeftGlyph()
Get the index of the left glyph in the kerning pair. |
int |
getRightGlyph()
Get the index of the right glyph in the kerning pair. |
int |
hashCode()
|
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Kerning(SWFDecoder coder,
Context context)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.context - a Context object used to manage the decoders for different
type of object and to pass information on how objects are
decoded.
IOException - if an error occurs while decoding the data.
public Kerning(int leftIndex,
int rightIndex,
int adjust)
leftIndex - the index in a code table for the glyph on the left side of
the pair. Must be in the range 0..65535.rightIndex - the index in a code table for the glyph on the right side of
the pair. Must be in the range 0..65535.adjust - the adjustment that will be added to the advance defined for
the left glyph. Must be in the range -32768..32767.| Method Detail |
|---|
public int getLeftGlyph()
public int getRightGlyph()
public int getAdjustment()
public String toString()
toString in class Objectpublic boolean equals(Object object)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int prepareToEncode(Context context)
prepareToEncode in interface SWFEncodeablecontext - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder,
Context context)
throws IOException
encode in interface SWFEncodeablecoder - an SWFEncoder object.context - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException - if an error occurs while encoding the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||