.::SWF::Font(3)

NAME
SWF::Font - SWF Font class

SYNOPSIS
        use SWF::Font;
        $font = new SWF::Font();

DESCRIPTION
Font object for later usage in Text and TextField objects.

NOTES
Ming 0.3's old getShape($font, $code) has been removed from interface. For getting details of glyph information you could draw a character into a shape and call dumpOutline() method, just like

        $sh=new SWF::Shape();
        $sh->drawGlyph($font, $char_nr);
        print $sh->dumpOutline();

METHODS

new SWF::Font($filename)
    Creates a Font object. $filename selects either True-Type Font '(ttf') file or Font Definition Block ('fdb') file as written by makefdb tool.

$font->getStringWidth($string)
$font->getUTF8StringWidth($UTF8string)
    Returns width of given string in pixels.

$font->getAscent()
    Returns the ascent of the current font, or 0 if not available.

$font->getDescent()
    Returns the descent of the current font, or 0 if not available.

$font->getLeading()
    Returns the leading of the current font, or 0 if not available.

$font->getName()
    Returns the name of the current font, do not confuse with font filename.

$font->getGlyphCount()
    Returns the glyph count of the current font.

AUTHOR
developers of ming ming.sourceforge.net

SEE ALSO
SWF, SWF::BrowserFont, SWF::Text, SWF::TextField, SWF::Shape, ISO 10646 (Unicode)