Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

imagefontheight

Description

The imagefontheight of Image for PHP get font height.

Syntax

imagefontheight(
    GdFont|int $font
): int

Parameters

font

Can be 1, 2, 3, 4, 5 for built-in fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, returned by imageloadfont().

Return

Returns the pixel height of the font.

Examples

1 · font · 1

<?

$font = 1;

$return = imagefontheight($font);
    
var_export($return);

?>
8

2 · font · 2

<?

$font = 2;

$return = imagefontheight($font);
    
var_export($return);

?>
13

3 · font · 3

<?

$font = 3;

$return = imagefontheight($font);
    
var_export($return);

?>
13

4 · font · 4

<?

$font = 4;

$return = imagefontheight($font);
    
var_export($return);

?>
16

5 · font · 5

<?

$font = 5;

$return = imagefontheight($font);
    
var_export($return);

?>
15

6 · font · imageloadfont

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/gdf/1.gdf';
$font = imageloadfont($filename);

$return = imagefontheight($font);
    
var_export($return);

?>
16
HomeMenu