|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.tumba.parser.swf.Symbol pt.tumba.parser.swf.Font
public class Font
A Font Symbol. The Font references a FontDefinition object from which it takes the glyph definitions it needs.
Nested Class Summary | |
---|---|
class |
Font.Chars
A set of contiguous characters in one font. |
class |
Font.NoGlyphException
Description of the Class |
Field Summary | |
---|---|
protected java.lang.Object |
font1Key
Description of the Field |
protected java.lang.Object |
font2Key
Description of the Field |
protected FontDefinition |
fontDef
Description of the Field |
protected java.util.List |
glyphList
Description of the Field |
protected java.util.Map |
glyphs
Description of the Field |
protected java.util.Map |
indices
Description of the Field |
Fields inherited from class pt.tumba.parser.swf.Symbol |
---|
id |
Constructor Summary | |
---|---|
Font(FontDefinition fontDef)
Constructor for the Font object |
Method Summary | |
---|---|
int |
addGlyph(FontDefinition.Glyph glyph)
Add a glyph and return the index |
Font.Chars |
chars(java.lang.String chars,
double fontSize)
Get the Chars instance for the given string at the given font size |
protected int |
define(boolean textFont,
Movie movie,
SWFTagTypes tagwriter)
Description of the Method |
protected int |
defineFont1(Movie movie,
SWFTagTypes tagwriter)
Description of the Method |
protected int |
defineFont2(Movie movie,
SWFTagTypes tagwriter)
Description of the Method |
protected int |
defineSymbol(Movie movie,
SWFTagTypes timelineWriter,
SWFTagTypes definitionwriter)
Description of the Method |
protected int[] |
getCodes()
Get the codes of the current set of glyphs |
FontDefinition |
getDefinition()
Gets the definition attribute of the Font object |
protected FontDefinition.Glyph |
getGlyph(int code,
int[] index2)
Gets the glyph attribute of the Font object |
java.util.List |
getGlyphList()
Gets the glyphList attribute of the Font object |
void |
loadAllGlyphs()
Load all glyphs from the font definition |
void |
loadGlyphs(java.lang.String chars)
Load the glyphs for the characters in the given string from the FontDefinition into this font. |
void |
setCode(int index,
int code)
Set the code for the glyph at the given index |
Methods inherited from class pt.tumba.parser.swf.Symbol |
---|
define, getId, getNextId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object font1Key
protected java.lang.Object font2Key
protected FontDefinition fontDef
protected java.util.Map glyphs
protected java.util.Map indices
protected java.util.List glyphList
Constructor Detail |
---|
public Font(FontDefinition fontDef)
fontDef
- Description of the ParameterMethod Detail |
---|
public FontDefinition getDefinition()
public java.util.List getGlyphList()
public void loadGlyphs(java.lang.String chars) throws Font.NoGlyphException
chars
- Description of the Parameter
Font.NoGlyphException
public void loadAllGlyphs()
public Font.Chars chars(java.lang.String chars, double fontSize) throws Font.NoGlyphException
chars
- Description of the ParameterfontSize
- Description of the Parameter
Font.NoGlyphException
- Description of the Exceptionprotected FontDefinition.Glyph getGlyph(int code, int[] index2) throws Font.NoGlyphException
code
- Description of the Parameterindex
- Description of the Parameter
Font.NoGlyphException
- Description of the Exceptionpublic int addGlyph(FontDefinition.Glyph glyph)
glyph
- The feature to be added to the Glyph attribute
public void setCode(int index, int code)
index
- The new code valuecode
- The new code valueprotected int define(boolean textFont, Movie movie, SWFTagTypes tagwriter) throws java.io.IOException
textFont
- Description of the Parametermovie
- Description of the Parametertagwriter
- Description of the Parameter
java.io.IOException
- Description of the Exceptionprotected int defineFont1(Movie movie, SWFTagTypes tagwriter) throws java.io.IOException
movie
- Description of the Parametertagwriter
- Description of the Parameter
java.io.IOException
- Description of the Exceptionprotected int defineFont2(Movie movie, SWFTagTypes tagwriter) throws java.io.IOException
movie
- Description of the Parametertagwriter
- Description of the Parameter
java.io.IOException
- Description of the Exceptionprotected int[] getCodes()
protected int defineSymbol(Movie movie, SWFTagTypes timelineWriter, SWFTagTypes definitionwriter) throws java.io.IOException
defineSymbol
in class Symbol
movie
- Description of the ParametertimelineWriter
- Description of the Parameterdefinitionwriter
- Description of the Parameter
java.io.IOException
- Description of the Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |