static function onImageQuality($string, $image, $fontName, $x = 0, $y = 0, $size = 10, $defaultColor = '000', $precision = 2)
    {
        $defaultColor = Color::StringToRgb24($defaultColor);
        $factor = 1 << ($precision > 31 ? 31 : $precision);

        $tokens = self::parseString($string);
        $rawText = '';
        foreach ($tokens as $token)
            $rawText .= $token->text;
        $maxBBox = imagettfbbox($size, 0, self::$fonts[$fontName]->getFile(), $rawText);

        $brush = imagecreatetruecolor($maxBBox[2] * 2, -$maxBBox[5] + 5);
        imagefill($brush, 0, 0, 0x7fffffff);
        $hugeBrush = imagecreatetruecolor(imagesx($brush) * $factor, imagesy($brush) * $factor);
        imagefill($hugeBrush, 0, 0, 0x7fffffff);

        $xOffset = 0;
        foreach ($tokens as $token)
            $xOffset += $token->onImage($hugeBrush, $fontName, $xOffset, imagesy($hugeBrush) * .75, $factor * $size, $defaultColor, $factor);

        $brushX = $x + imagesx($brush) / 2;
        $brushY = $y - imagesy($brush) * .25;
        imagecopyresampled($brush, $hugeBrush, 0, 0, 0, 0, imagesx($brush), imagesy($brush), imagesx($hugeBrush), imagesy($hugeBrush));
        imagesetbrush($image, $brush);
        imageline($image, $brushX, $brushY, $brushX, $brushY, IMG_COLOR_BRUSHED);
    }