<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ps.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.ps-stringwidth.php',
    1 => 'ps_stringwidth',
    2 => 'Gets width of a string',
  ),
  'up' => 
  array (
    0 => 'ref.ps.php',
    1 => 'PS Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.ps-string-geometry.php',
    1 => 'ps_string_geometry',
  ),
  'next' => 
  array (
    0 => 'function.ps-stroke.php',
    1 => 'ps_stroke',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ps/functions/ps-stringwidth.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ps-stringwidth" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ps_stringwidth</h1>
  <p class="verinfo">(PECL ps &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">ps_stringwidth</span> &mdash; <span class="dc-title">Gets width of a string</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.ps-stringwidth-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ps_stringwidth</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$psdoc</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$text</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$fontid</code><span class="initializer"> = 0</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$size</code><span class="initializer"> = 0.0</span></span><br>): <span class="type"><a href="language.types.float.php" class="type float">float</a></span></div>

  <p class="para rdfs-comment">
   Calculates the width of a string in points if it was output
   in the given font and font size.
   This function needs an Adobe font
   metrics file to calculate the precise width. If kerning is turned on,
   it will be taken into account.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ps-stringwidth-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">psdoc</code></dt>
     <dd>
      <p class="para">
       Resource identifier of the postscript file
       as returned by <span class="function"><a href="function.ps-new.php" class="function">ps_new()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">text</code></dt>
     <dd>
      <p class="para">
       The text for which the width is to be calculated.
      </p>
     </dd>
    
    
     <dt><code class="parameter">fontid</code></dt>
     <dd>
      <p class="para">
       The identifier of the font to be used. If not font is specified
       the current font will be used.
      </p>
     </dd>
    
    
     <dt><code class="parameter">size</code></dt>
     <dd>
      <p class="para">
       The size of the font. If no size is specified the current size
       is used.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ps-stringwidth-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Width of a string in points.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ps-stringwidth-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ps-string-geometry.php" class="function" rel="rdfs-seeAlso">ps_string_geometry()</a> - Gets geometry of a string</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>