In other words, Processing has a quite primitive text handling capability, so you have to split the text yourself at the points with different styles, compute the length of each segment, draw each segment at the computed location with the proper style (color, perhaps different font, including bold / italics).
Not a small task, but not too hard for simple cases.