PHP code example of afaztech / glyphify

1. Go to this page and download the library: Download afaztech/glyphify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

afaztech / glyphify example snippets




fazTech\Glyphify\Glyphify;

// Create instance with your text
$glyphify = new Glyphify("Hello World");

// Generate all available fonts
$results = $glyphify->generate();

// Display styled text
$glyphify->display();

// Get specific font
$specific = $glyphify->generate('Bold');

$config = [
    'persian' => true,     // Enable Persian font generation
    'latin' => true,       // Enable Latin font generation
    'finglish' => true,    // Enable Finglish transliteration
    'all_fonts' => false,  // Generate ALL fonts at once
];

$glyphify = new Glyphify("Your text here", $config);

// Get as array
$array = $glyphify->getArray();

// Get as JSON
$json = $glyphify->toJson();

// Get as CSV
$csv = $glyphify->toCsv();

// Display in CLI
$glyphify->display();