Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.24 KB | None | 0 0
  1. <?php
  2.  
  3. // hinzufügen der Library
  4. include "src/habbofont2.php";
  5.  
  6. // Fehlermeldungen aktivieren
  7. error_reporting(E_ALL);
  8. ini_set("display_errors", 1);
  9.  
  10. // erstellen einer HabboFont2 Applikation
  11. $app = new phil\HabboFont2\App();
  12.  
  13. // text, welcher als Logo erstellt werden soll
  14. $text = \phil\HabboFont2\fonts\Font::trim("Habbo");
  15.  
  16. $fontCollector = $app->getFontCollector();
  17. // Schriftarten hinzufügen
  18. $fontCollector->add(new \phil\HabboFont2\app\fonts\large\LargeDefaultFont());
  19. $fontCollector->add(new \phil\HabboFont2\app\fonts\large\MediumDefaultFont());
  20.  
  21. $artist = $app->getArtist();
  22.  
  23. $artist->setText($text)
  24.     // Schriftart auswählen
  25.     ->setFont($fontCollector->find(\phil\HabboFont2\app\fonts\large\MediumDefaultFont::class)
  26.  
  27.     // Addons hinzufügen
  28.     ->withAddons([
  29.         \phil\HabboFont2\app\addons\MediumBetaSignAddon::class
  30.     ]))
  31.  
  32.     // save(<string = Verzeichnis zum speichern>, <bool = Bild cachen>)
  33.     ->save(\phil\HabboFont2\Config::SAVE_PATH, \phil\HabboFont2\Config::SAVE_IMAGES)
  34.  
  35.     // ausführen
  36.     ->execute(function (\phil\HabboFont2\artist\ArtistResult $ar) {
  37.  
  38.         header("Content-type: image/png");
  39.         imagePNG($ar->getRawImage());
  40.         imageDestroy($ar->getRawImage());
  41.  
  42.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement