Combine textentity and curves as custom object

I have created a custom geometry with data using Userdata and CustomCurveObject, now I want to further add text annotation in this custom object, can anyone help me?
This is my current custom object


this is what i want