public function calculateWidth(string $text, int $size = null)
    {
        $size = round(($size ?: static::TEXT_SIZE) * 0.75, 1);
        $box = imagettfbbox($size, 0, $this->path, $text);

        return round(abs($box[2] - $box[0]) + static::SHIELD_PADDING_EXTERNAL + static::SHIELD_PADDING_INTERNAL, 1);
    }