1
votes

I'm using Direct3D via SlimDX to develop an AutoCAD file viewer.

The best means of rendering text that I can think of is to vectorize the text into a vertex buffer and then simply render them as a line strip.

Rendering the text to a texture to map onto a polygon isn't suitable, I need a vector method.

Can anyone advise me on how to get the vector information from a true type font?

1
May I ask why rendering the text to a texture isn't suitable? That seems to be the way most Direct3D program do text... - Stephen Chung
In an AutoCAD viewer the user needs to be able to zoom in, potentially a long way; hence the need to retain vectorisation. - Toby Wilson
OK. Then I think you need to search for a way to display a "portion" of text that is arbitrary point size (can be huge). Not sure if there is some GDI+ functions that can do it. I don't think you should spend time on your proposed method, as it requires first getting the outline of each glyph, quantize these curves into straight line segments, then tesselate them into triangles for Direct3D to groke it. You're in for a lot of pain. - Stephen Chung
The proper method is to find a way to "draw" the text at that large a magnification (which should only be the portion that shows on the screen) into a texture. - Stephen Chung

1 Answers

0
votes

Came up with a solution calling gdi32.dll's GetGlyphOutline() function.