<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Slant a font</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagepsloadfont.html">imagepsloadfont</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagepstext.html">imagepstext</a></div> <div class="up"><a href="ref.image.html">GD and Image Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.imagepsslantfont" class="refentry"> <div class="refnamediv"> <h1 class="refname">imagepsslantfont</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imagepsslantfont</span> — <span class="dc-title">Slant a font</span></p> </div> <div class="refsect1 description" id="refsect1-function.imagepsslantfont-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>imagepsslantfont</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$font_index</code></span> , <span class="methodparam"><span class="type">float</span> <code class="parameter">$slant</code></span> )</div> <p class="para rdfs-comment"> Slant a given font given. </p> </div> <div class="refsect1 parameters" id="refsect1-function.imagepsslantfont-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">font_index</code></em></span> <dd> <p class="para"> A font resource, returned by <span class="function"><a href="function.imagepsloadfont.html" class="function">imagepsloadfont()</a></span>. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">slant</code></em></span> <dd> <p class="para"> Slant level. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.imagepsslantfont-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 examples" id="refsect1-function.imagepsslantfont-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-3269"> <p><strong>Example #1 <span class="function"><strong>imagepsslantfont()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// Load a .pfb font file<br /></span><span style="color: #0000BB">$font </span><span style="color: #007700">= </span><span style="color: #0000BB">imagepsloadfont</span><span style="color: #007700">(</span><span style="color: #DD0000">'./px3l.pfb'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Slant the font by 22.5<br /></span><span style="color: #0000BB">imagepsslantfont</span><span style="color: #007700">(</span><span style="color: #0000BB">$font</span><span style="color: #007700">, </span><span style="color: #0000BB">22.5</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Do any operations with the font here<br /><br />// Free the font from memory<br /></span><span style="color: #0000BB">imagepsfreefont</span><span style="color: #007700">(</span><span style="color: #0000BB">$font</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </p> </div> <div class="refsect1 notes" id="refsect1-function.imagepsslantfont-notes"> <h3 class="title">Notes</h3> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">This function is only available if PHP is compiled using <strong class="option configure">--with-t1lib[=DIR]</strong> . </span></p></blockquote> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagepsloadfont.html">imagepsloadfont</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagepstext.html">imagepstext</a></div> <div class="up"><a href="ref.image.html">GD and Image Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>