protected function getDimensions($text)
    {
        $box = imagettfbbox(38, 0, $this->fontPath, $text);

        return [
            'width' => abs($box[4] - $box[0]),
            'height' => abs($box[5] - $box[1]),
        ];
    }