|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.FSTransformObject
com.flagstone.transform.FSKerning
public class FSKerning
FSKerning describes the spacing between a pair of glyphs.
The 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 is specified relative to the advance define for the left glyph.
Attributes | |
---|---|
leftIndex | The index into the code table that identifies the glyph on the left side of the pair. |
rightIndex | The index into a code table that identifies the glyph on the right side of the pair. |
adjustment | The adjustment in twips that will be added to the advance for the glyph on the left side of the pair to obtain the final spacing between the glyphs. |
FSKerning objects are only used within FSDefineFont2 objects and provide more precise control over the layout of a font's glyph than was possible using the FSDefineFont and FSFontInfo objects.
FSKerning class represents the KerningRecord from the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 2.
Constructor Summary | |
---|---|
FSKerning(FSCoder coder)
Construct an FSKerning object, initialising it with values decoded from an encoded object. |
|
FSKerning(FSKerning obj)
Constructs an FSKerning object by copying values from an existing object. |
|
FSKerning(int leftIndex,
int rightIndex,
int adjust)
Constructs an FSKerning object specifying the glyph indexes and adjustment. |
Method Summary | |
---|---|
void |
appendDescription(java.lang.StringBuffer buffer,
int depth)
AppendDescription is used to present a string description of the object including all nested objects up to a specified depth. |
void |
decode(FSCoder coder)
|
void |
encode(FSCoder coder)
|
boolean |
equals(java.lang.Object anObject)
Returns true if anObject is equal to this one. |
int |
getAdjustment()
Gets the adjustment, in twips, to the advance of the left glyph. |
int |
getLeftGlyphIndex()
Gets the index of the left glyph in the kerning pair. |
int |
getRightGlyphIndex()
Gets the index of the right glyph in the kerning pair. |
int |
length(FSCoder coder)
|
void |
setAdjustment(int aNumber)
Sets the adjustment, in twips, to the advance of the left glyph. |
void |
setLeftGlyphIndex(int anIndex)
Sets the index of the left glyph in the kerning pair. |
void |
setRightGlyphIndex(int anIndex)
Sets the index of the right glyph in the kerning pair. |
Methods inherited from class com.flagstone.transform.FSTransformObject |
---|
clone, name, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FSKerning(FSCoder coder)
coder
- an FSCoder containing the binary data.public FSKerning(int leftIndex, int rightIndex, int adjust)
leftIndex
- the index in a code table for the glyph on the left side of
the pair.rightIndex
- the index in a code table for the glyph on the right side of
the pair.adjust
- the adjustment that will be added to the advance defined for
the left glyph.public FSKerning(FSKerning obj)
obj
- an FSKerning object.Method Detail |
---|
public int getLeftGlyphIndex()
public int getRightGlyphIndex()
public int getAdjustment()
public void setLeftGlyphIndex(int anIndex)
anIndex
- the index in a code table for the glyph on the left side of
the pair.public void setRightGlyphIndex(int anIndex)
anIndex
- the index in a code table for the glyph on the right side of
the pair.public void setAdjustment(int aNumber)
aNumber
- the adjustment that will be added to the advance defined for
the left glyph.public boolean equals(java.lang.Object anObject)
equals
in class FSTransformObject
public void appendDescription(java.lang.StringBuffer buffer, int depth)
FSTransformObject
appendDescription
in class FSTransformObject
buffer
- a StringBuffer to which the description of each object is
appended.depth
- the maximum level of nesting up to which objects will be
displayed.public int length(FSCoder coder)
length
in class FSTransformObject
public void encode(FSCoder coder)
encode
in class FSTransformObject
public void decode(FSCoder coder)
decode
in class FSTransformObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |