libraries/ManiaLib/Utils/StyleParser.php
static function onImageFast($string, $image, $fontName, $x = 0, $y = 0, $size = 10, $defaultColor = '000')
    {
        $defaultColor = Color::StringToRgb24($defaultColor);

        $xOffset = 0;
        foreach (self::parseString($string) as $token)
            $xOffset += $token->onImage($image, $fontName, $x + $xOffset, $y, $size, $defaultColor, 1);
    }
static function onImageFast($string, $image, $fontName, $x = 0, $y = 0, $size = 10, $defaultColor = '000')
    {
        $defaultColor = Color::StringToRgb24($defaultColor);

        $xOffset = 0;
        foreach (self::parseString($string) as $token)
            $xOffset += $token->onImage($image, $fontName, $x + $xOffset, $y, $size, $defaultColor, 1);
    }
Draw a string with on an image using fast method. There can be glitches when using small sizes
@param string $string The style-coded string to draw
@param imageResource $image The image to draw on
@param string $fontName The TTF font to use, which has been declared previously
@param int $x X position
@param int $y Y position
@param int $size Font size
@param string $defaultColor Default text color in 3 or 6 hexadecimal characters