1.::SWF::Font(3)       User Contributed Perl Documentation      .::SWF::Font(3)
2
3
4

NAME

6       SWF::Font - SWF Font class
7

SYNOPSIS

9               use SWF::Font;
10               $font = new SWF::Font();
11

DESCRIPTION

13       Font object for later usage in Text and TextField objects.
14

NOTES

16       Ming 0.3's old getShape($font, $code) has been removed from interface.
17       For getting details of glyph information you could draw a character
18       into a shape and call dumpOutline() method, just like
19
20               $sh=new SWF::Shape();
21               $sh->drawGlyph($font, $char_nr);
22               print $sh->dumpOutline();
23

METHODS

25       new SWF::Font($filename)
26           Creates a Font object. $filename selects either True-Type Font
27           '(ttf') file or Font Definition Block ('fdb') file as written by
28           makefdb tool.
29
30       $font->getStringWidth($string)
31       $font->getUTF8StringWidth($UTF8string)
32           Returns width of given string in pixels.
33
34       $font->getAscent()
35           Returns the ascent of the current font, or 0 if not available.
36
37       $font->getDescent()
38           Returns the descent of the current font, or 0 if not available.
39
40       $font->getLeading()
41           Returns the leading of the current font, or 0 if not available.
42
43       $font->getName()
44           Returns the name of the current font, do not confuse with font
45           filename.
46
47       $font->getGlyphCount()
48           Returns the glyph count of the current font.
49

AUTHOR

51       developers of ming ming.sourceforge.net
52

SEE ALSO

54       SWF, SWF::BrowserFont, SWF::Text, SWF::TextField, SWF::Shape, ISO 10646
55       (Unicode)
56
57
58
59perl v5.32.0                      2020-07-28                   .::SWF::Font(3)
Impressum