<?php
declare(strict_types=1);

$fontBytes = base64_decode(file_get_contents("fixture-font.base64"), true);
file_put_contents("fixture.ttf", $fontBytes);
$font = __DIR__ . "/fixture.ttf";
$image = imagecreatetruecolor(240, 70);
$white = imagecolorallocate($image, 255, 255, 255);
$box = imagefttext($image, 18.0, 0.0, 4, 44, $white, $font, "Чашка");
echo count($box), " coordinates\n";
imagepng($image, "label.png");
echo getimagesize("label.png")[0], "x", getimagesize("label.png")[1], "\n";
