<?php
declare(strict_types=1);

$header = pack("i4", 1, 65, 2, 2);
file_put_contents("fixture.gdf", $header . chr(1) . chr(1) . chr(1) . chr(1));
$font = imageloadfont("fixture.gdf");
$image = imagecreatetruecolor(4, 4);
$white = imagecolorallocate($image, 255, 255, 255);
imagestring($image, $font, 0, 0, "A", $white);
echo imagecolorat($image, 0, 0) === $white ? "custom glyph drawn\n" : "empty\n";
