1. The easiest way is to have some letters in a different color in the same font (like in my case A white or D orange), which just have another code, like ° or ~ instead of A or D (since I need A and D usually in beige). Then you just name the object or convert its name when displayed, to the according glyphs. In this example, instead of AD " ^~ ". Now AD are displayed in a different color in the same font and same object. Little effort, besides substituting the original object name with other glyphs. Of course, you need a lot of glyphs, so maybe it is wise to split the same system in a different fonts for the alphabet and for numbers.
2. I am also just repositioning some words in the special color. You can detect, if a word is included, count the tokens before and position your word accordingly. (That means the word in the special color is just laying above the other text including the word in the original color.)
3. You can even count tokens in your text, then count the width (character width + token count), then place the new word after the previous font, add it's width, then continue with the other one again. But here, you have to mind the paragraph rules (max characters per line), to limit the width of a line and break your word into a new one, if necessary.
I know, the first 2 solutions are not as flexible, as you mean it (I think), but you need to reconsider, how much effort you want to invest. The first solution is really easy, and should work fine, if you just take one special color.
Hope it helps...