Create Custom IBeam?

I am making a custom ibeam (don’t ask why, its for a project) but I can’t seem to get it working. I am using CursorPosition and textbounds but i cant seem to get it accurate. Does anyone know how?