php8.5
Home/ Manual/ imagick / imagick/ Imagick::queryFonts

Imagick::queryFonts

PHP function Edit on GitHub ✎

(PECL imagick 2, PECL imagick 3)

Returns the configured fonts

Description

Imagick::queryFonts(string $pattern = "*"): array

Returns the configured fonts.

Parameters

pattern

The query pattern

Return Values

Returns an array containing the configured fonts.

Errors/Exceptions

Throws

Examples

Imagick::queryFonts()

php
<?php
        $output = '';
        $output .= "Fonts that match 'Helvetica*' are:<br/>";

        $fontList = \Imagick::queryFonts("Helvetica*");
 
        foreach ($fontList as $fontName) {
            $output .= '<li>'. $fontName."</li>";
        }

        return $output;

?>

Source: reference/imagick/imagick/queryfonts.xml · from the official PHP manual (php/doc-en)