There are existing resources about how to render fonts in OpenGL (FTGL etc.)…I’m not asking about that. I want to know if there are any published libraries, algorithms, papers, etc. on dealing with text in 3d space intersecting geometry. For example, if you draw a label at a country location on a 3d earth, the geometry will often intersect the earth. I’ve seen some examples which always show the whole label, but then as the location of the label disappears around the back of the earth, the label shrinks and/or fades out.
Other things a text engine might handle is precedence for overlapping labels.
I used to work in 3D mapping. This is a hard problem. There is a wealth of literature on it. You will have to start googling and learning, there’s not really any way around it.
Here are a few approaches: