C# Class SwfDotNet.IO.Tags.DefineFontInfoTag

DefineFontInfoTag defines the name and face of a font and maps the codes for a given character set to the glyphs that are drawn to represent each character.

The ANSI character set is used for Latin languages, SJIS is used for Japanese language characters and Unicode is used for any character set. The encoding attributes uses the constants ANSI, SJIS or Unicode for each character set type.

The index of each entry in the codes array matches the index in the corresponding glyph in the shapes array of an DefineFontTag object, allowing a given character code to be mapped to a given glyph.

The class allows the font associated with a Flash file to be mapped to a font installed on the device where the Flash Player displaying the file is hosted. The use of a font from a device is not automatic but is determined by the HTML tag option deviceFont which is passed to the Flash Player when it is first started. If a device does not support a given font then the glyphs in the DefineFontTag class are used to render the characters.

An important distinction between the host device to specify the font and using the glyphs in an DefineFontTag object is that the device is not anti-aliased and the rendering is dependent on the host device. The glyphs in an DefineFontTag object are anti-aliased and are guaranteed to look identical on every device the text is displayed.

This tag was introduced in Flash 1.

Inheritance: BaseTag, DefineTag
Afficher le fichier Open project: bladecoding/SwfExport Class Usage Examples

Méthodes publiques

Méthode Description
DefineFontInfoTag ( ) : System

Creates a new DefineFontInfoTag instance.

DefineFontInfoTag ( ushort fontId, string fontName, bool fontFlagsSmallText, bool fontFlagsShiftJIS, bool fontFlagsAINSI, bool fontFlagsItalic, bool fontFlagsBold, uint codeTable ) : System

Creates a new DefineFontInfoTag instance.

ReadData ( byte version, BufferedBinaryReader binaryReader ) : void

see base class

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

UpdateData ( byte version ) : void

see base class

Méthodes protégées

Méthode Description
GetSizeOf ( ) : int

Gets the size of.

Method Details

DefineFontInfoTag() public méthode

Creates a new DefineFontInfoTag instance.
public DefineFontInfoTag ( ) : System
Résultat System

DefineFontInfoTag() public méthode

Creates a new DefineFontInfoTag instance.
public DefineFontInfoTag ( ushort fontId, string fontName, bool fontFlagsSmallText, bool fontFlagsShiftJIS, bool fontFlagsAINSI, bool fontFlagsItalic, bool fontFlagsBold, uint codeTable ) : System
fontId ushort Font id.
fontName string Name of the font.
fontFlagsSmallText bool Font flags small text.
fontFlagsShiftJIS bool Font flags shift JIS.
fontFlagsAINSI bool Font flags AINSI.
fontFlagsItalic bool Font flags italic.
fontFlagsBold bool Font flags bold.
codeTable uint Code table.
Résultat System

GetSizeOf() protected méthode

Gets the size of.
protected GetSizeOf ( ) : int
Résultat int

ReadData() public méthode

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
Résultat void

Serialize() public méthode

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
Résultat void

UpdateData() public méthode

see base class
public UpdateData ( byte version ) : void
version byte
Résultat void