<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.image.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.imagefontheight.php',
    1 => 'imagefontheight',
    2 => 'Получение высоты шрифта',
  ),
  'up' => 
  array (
    0 => 'ref.image.php',
    1 => 'Функции GD и функции для работы с изображениями',
  ),
  'prev' => 
  array (
    0 => 'function.imageflip.php',
    1 => 'imageflip',
  ),
  'next' => 
  array (
    0 => 'function.imagefontwidth.php',
    1 => 'imagefontwidth',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/image/functions/imagefontheight.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imagefontheight" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagefontheight</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imagefontheight</span> &mdash; <span class="dc-title">Получение высоты шрифта</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imagefontheight-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagefontheight</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="class.gdfont.php" class="type GdFont">GdFont</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$font</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Возвращает высоту в пикселах символа заданного шрифта.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imagefontheight-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">font</code></dt><dd><p class="para">Принимает значения
1, 2, 3, 4, 5 для встроенных шрифтов в кодировке
latin2 (более высокое число соответствует большему шрифту) или экземпляр класса <span class="classname"><a href="class.gdfont.php" class="classname">GdFont</a></span>,
который возвращает функция <span class="function"><a href="function.imageloadfont.php" class="function">imageloadfont()</a></span>.
</p></dd>
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imagefontheight-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Возвращает высоту в пикселах.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imagefontheight-changelog">
  <h3 class="title">Список изменений</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Версия</th>
       <th>Описание</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
  <td>8.1.0</td>
  <td>
  Параметр <code class="parameter">font</code> теперь принимает как экземпляр класса <span class="classname"><a href="class.gdfont.php" class="classname">GdFont</a></span>,
  так и целое число (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>); раньше параметр принимал только целое число (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>).
  </td>
</tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.imagefontheight-examples">
  <h3 class="title">Примеры</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Пример #1 
     Пример использования <span class="function"><strong>imagefontheight()</strong></span> на встроенных шрифтах
    </strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">'Font height: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">imagefontheight</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    
<div class="example-contents"><p>
 Вывод приведённого примера будет похож на:
</p></div>

    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Font height: 16</pre>
</div>
    </div>
   </div>
   <div class="example" id="example-2">
    <p><strong>Пример #2 
     Использование <span class="function"><strong>imagefontheight()</strong></span> вместе с
     <span class="function"><a href="function.imageloadfont.php" class="function">imageloadfont()</a></span>
    </strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// загрузка .gdf шрифта<br /></span><span style="color: #0000BB">$font </span><span style="color: #007700">= </span><span style="color: #0000BB">imageloadfont</span><span style="color: #007700">(</span><span style="color: #DD0000">'anonymous.gdf'</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #DD0000">'Высота шрифта: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">imagefontheight</span><span style="color: #007700">(</span><span style="color: #0000BB">$font</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    
<div class="example-contents"><p>
 Вывод приведённого примера будет похож на:
</p></div>

    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Font height: 43</pre>
</div>
    </div>
   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.imagefontheight-seealso">
  <h3 class="title">Смотрите также</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.imagefontwidth.php" class="function" rel="rdfs-seeAlso">imagefontwidth()</a> - Получение ширины шрифта</span></li>
   <li><span class="function"><a href="function.imageloadfont.php" class="function" rel="rdfs-seeAlso">imageloadfont()</a> - Загружает новый шрифт</span></li>
  </ul>
 </div>

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