font Element

The font element defines TrueType font to be embedded into SWF file generated.

Syntax

<font id="fontId" src="fontSource" [name="fontName"]
    [chars="charactersToEmbed"] [autoFillChars="isCharsAutoFilled"] [faceIndex="fontFaceIndex"]/>

 

Attributes

Name

Description

Value type

Optional

Default Value

id

Object identifier

id

no

-

src

Source TrueType font file name to be embedded.

Use following notation for src attribute:
For resources located in local filesystem: "C:\My folder\myfile.ttf"
For web resources use HTTP URLs: "http://mysite.com/myfile.ttf"

string

no

-

name

Font name. Should be specified it if you like to replace original font name taken from source TrueType font file. This name may appear in face attribute of HTML <font> tag inside htmlText element.

string

yes

-

chars

Set of font symbols which will be embedded in target SWF file. If not empty, glyphs for only specified characters will be embedded. Overrides autoFillChars attribute.

string

yes

-

autoFillChars

Applies if chars attribute is not empty. If true, then set font symbols to be embedded in target SWF file is detected automatically.

boolean

yes

true

faceIndex

The index of the face within the font. Should be used for font files containing multiple faces (TrueType collections). The first face index is 0. See this article for more details.

boolean

yes

0

Remarks

If you specify <font id="mySampleFontId" src="arial.ttf" chars="ABC"> then glyphs for only A, B and C characters will be extracted from source file arial.ttf and embedded into SWF file generated.

Parent Elements

objects collection

See Also

XML Schema Reference