2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
5
<title>SWF::Font - SWF Font class</title>
6
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
<link rev="made" href="mailto:feedback@suse.de" />
10
<body style="background-color: white">
15
<p><a name="__index__"></a></p>
19
<li><a href="#name">NAME</a></li>
20
<li><a href="#synopsis">SYNOPSIS</a></li>
21
<li><a href="#description">DESCRIPTION</a></li>
22
<li><a href="#notes">NOTES</a></li>
23
<li><a href="#methods">METHODS</a></li>
24
<li><a href="#author">AUTHOR</a></li>
25
<li><a href="#see_also">SEE ALSO</a></li>
34
<h1><a name="name">NAME</a></h1>
35
<p>SWF::Font - SWF Font class</p>
39
<h1><a name="synopsis">SYNOPSIS</a></h1>
42
$font = new SWF::Font();</pre>
46
<h1><a name="description">DESCRIPTION</a></h1>
47
<p>Font object for later usage in Text and TextField objects.</p>
51
<h1><a name="notes">NOTES</a></h1>
52
<p>Ming 0.3's old getShape($font, $code) has been removed from interface.
53
For getting details of glyph information you could draw a character
54
into a shape and call <code>dumpOutline()</code> method, just like</p>
57
$sh->drawGlyph($font, $char_nr);
58
print $sh->dumpOutline();</pre>
62
<h1><a name="methods">METHODS</a></h1>
64
<dt><strong><a name="font" class="item">new SWF::Font($filename)</a></strong>
67
<p>Creates a Font object. $filename selects either True-Type Font '(ttf')
68
file or Font Definition Block ('fdb') file as written by makefdb tool.</p>
71
<dt><strong><a name="getstringwidth" class="item">$font-><code>getStringWidth($string)</code></a></strong>
73
<dt><strong><a name="getutf8stringwidth" class="item">$font->getUTF8StringWidth($UTF8string)</a></strong>
76
<p>Returns width of given string in pixels.</p>
79
<dt><strong><a name="getascent" class="item">$font-><code>getAscent()</code></a></strong>
82
<p>Returns the ascent of the current font, or 0 if not available.</p>
85
<dt><strong><a name="getdescent" class="item">$font-><code>getDescent()</code></a></strong>
88
<p>Returns the descent of the current font, or 0 if not available.</p>
91
<dt><strong><a name="getleading" class="item">$font-><code>getLeading()</code></a></strong>
94
<p>Returns the leading of the current font, or 0 if not available.</p>
97
<dt><strong><a name="getname" class="item">$font-><code>getName()</code></a></strong>
100
<p>Returns the name of the current font, do not confuse with font filename.</p>
103
<dt><strong><a name="getglyphcount" class="item">$font-><code>getGlyphCount()</code></a></strong>
106
<p>Returns the glyph count of the current font.</p>
113
<h1><a name="author">AUTHOR</a></h1>
114
<p>developers of ming
115
ming.sourceforge.net</p>
119
<h1><a name="see_also">SEE ALSO</a></h1>
120
<p>SWF, SWF::BrowserFont, SWF::Text, SWF::TextField, SWF::Shape, ISO 10646 (Unicode)</p>