NAME

SWF::Builder::Font - SWF font object

SYNOPSIS

my $font = $mc->new_font('c:/windows/font/arial.ttf');
$font->add_glyph('0123456789');

DESCRIPTION

This module creates SWF fonts from TrueType fonts.

$font = $mc->new_font( $fontfile [, $fontname] )

returns a new font. $fontfile is a font file name. It should be a TrueType font file (ttf/ttc). Optional $fontname is a font name referred by HTMLs in dynamic texts. The font name is taken from the TrueType file if not defined.

$font->embed( [$embed] )

sets/gets a flag to embed the font or not.

$font->is_readonly

gets a permission flag to use the font only 'preview & print'. If the flag is set, the font cannot be used for text field.

$font->get_average_width

gets the average character width.

$font->add_glyph( $char_string )

adds glyph data of the characters of the string to the font. Usually, SWF::Builder::Text adds required glyph data automatically. It is necessary to do add_glyph if the font is used for a dynamic text or a text field which will be changed at playing time.

$font->LanguageCode( $code )

sets the spoken language of texts to which the font is applied. $code can take 'none', 'Latin', 'Japanese', 'Korean', 'Simplified Chinese', and 'Traditional Chinese'. It can also take a number, 0, 1, 2, 3, 4, and 5, or an initial, 'n', 'J', 'K', 'S'(or 'C'), and 'T', respectively.

COPYRIGHT

Copyright 2003 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.