Using Dynamic Material Instance Doesn't Work Properly With Render Text Material

I have a material for my render text component, and it work just fine. I am trying to add the functionality for changing the appearance during gameplay. It seems that the font is corrupted.

Here is it working correctly:

Here is what happens when using a dynamic material instance:

I solved it. I abandoned dynamic material instance and I am instead using custom primitive data for the material colour parameter.