|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.tumba.parser.swf.FontDefinition
public class FontDefinition
A Font Definition that can referenced by Font symbols. If read in from an existing Flash movie the font definition may only contain a subset of the glyphs in the font. To use a system font set the hasMetrics flag to false.
Nested Class Summary | |
---|---|
static class |
FontDefinition.Glyph
A Glyph within the font. |
static class |
FontDefinition.KerningPair
A Kerning Pair is an adjustment to the advance between two particular glyphs. |
Field Summary | |
---|---|
protected double |
ascent
Description of the Field |
protected double |
descent
Description of the Field |
protected java.util.Map |
glyphLookup
Description of the Field |
protected java.util.List |
glyphs
Description of the Field |
protected boolean |
hasMetrics
Description of the Field |
protected boolean |
isAnsi
Description of the Field |
protected boolean |
isBold
Description of the Field |
protected boolean |
isItalic
Description of the Field |
protected boolean |
isShiftJIS
Description of the Field |
protected boolean |
isUnicode
Description of the Field |
protected java.util.List |
kerning
Description of the Field |
protected java.util.Map |
kernLookup
Description of the Field |
protected double |
leading
Description of the Field |
protected java.lang.String |
name
Description of the Field |
Constructor Summary | |
---|---|
FontDefinition()
Constructor for the FontDefinition object |
|
FontDefinition(java.lang.String name,
double ascent,
double descent,
double leading,
boolean isUnicode,
boolean isShiftJIS,
boolean isAnsi,
boolean isItalic,
boolean isBold,
boolean hasMetrics)
Constructor for the FontDefinition object |
Method Summary | |
---|---|
double |
getAscent()
Gets the ascent attribute of the FontDefinition object |
double |
getDescent()
Gets the descent attribute of the FontDefinition object |
FontDefinition.Glyph |
getGlyph(int code)
Look up a glyph by code |
java.util.List |
getGlyphList()
Get the List of Glyph objects |
double |
getKerningOffset(int code1,
int code2)
Get the kerning adjustment required between the two given codes |
java.util.List |
getKerningPairList()
Get the List of KerningPair objects |
double |
getLeading()
Gets the leading attribute of the FontDefinition object |
java.lang.String |
getName()
Gets the name attribute of the FontDefinition object |
boolean |
hasMetrics()
Description of the Method |
boolean |
isAnsi()
Gets the ansi attribute of the FontDefinition object |
boolean |
isBold()
Gets the bold attribute of the FontDefinition object |
boolean |
isItalic()
Gets the italic attribute of the FontDefinition object |
boolean |
isShiftJIS()
Gets the shiftJIS attribute of the FontDefinition object |
boolean |
isUnicode()
Gets the unicode attribute of the FontDefinition object |
void |
setAscent(double ascent)
Sets the ascent attribute of the FontDefinition object |
void |
setDescent(double descent)
Sets the descent attribute of the FontDefinition object |
void |
setFontFlags(boolean isUnicode,
boolean isShiftJIS,
boolean isAnsi,
boolean isItalic,
boolean isBold,
boolean hasMetrics)
Sets the fontFlags attribute of the FontDefinition object |
void |
setLeading(double leading)
Sets the leading attribute of the FontDefinition object |
void |
setName(java.lang.String name)
Sets the name attribute of the FontDefinition object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected double ascent
protected double descent
protected double leading
protected boolean isUnicode
protected boolean isShiftJIS
protected boolean isAnsi
protected boolean isItalic
protected boolean isBold
protected boolean hasMetrics
protected java.util.List glyphs
protected java.util.List kerning
protected java.util.Map glyphLookup
protected java.util.Map kernLookup
Constructor Detail |
---|
public FontDefinition()
public FontDefinition(java.lang.String name, double ascent, double descent, double leading, boolean isUnicode, boolean isShiftJIS, boolean isAnsi, boolean isItalic, boolean isBold, boolean hasMetrics)
name
- Description of the Parameterascent
- Description of the Parameterdescent
- Description of the Parameterleading
- Description of the ParameterisUnicode
- Description of the ParameterisShiftJIS
- Description of the ParameterisAnsi
- Description of the ParameterisItalic
- Description of the ParameterisBold
- Description of the ParameterhasMetrics
- Description of the ParameterMethod Detail |
---|
public java.lang.String getName()
public double getAscent()
public double getDescent()
public double getLeading()
public boolean isUnicode()
public boolean isShiftJIS()
public boolean isAnsi()
public boolean isItalic()
public boolean isBold()
public boolean hasMetrics()
public java.util.List getGlyphList()
public java.util.List getKerningPairList()
public void setName(java.lang.String name)
name
- The new name valuepublic void setAscent(double ascent)
ascent
- The new ascent valuepublic void setDescent(double descent)
descent
- The new descent valuepublic void setLeading(double leading)
leading
- The new leading valuepublic void setFontFlags(boolean isUnicode, boolean isShiftJIS, boolean isAnsi, boolean isItalic, boolean isBold, boolean hasMetrics)
isUnicode
- The new fontFlags valueisShiftJIS
- The new fontFlags valueisAnsi
- The new fontFlags valueisItalic
- The new fontFlags valueisBold
- The new fontFlags valuehasMetrics
- The new fontFlags valuepublic FontDefinition.Glyph getGlyph(int code)
code
- Description of the Parameter
public double getKerningOffset(int code1, int code2)
code1
- Description of the Parametercode2
- Description of the Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |