[vtkusers] vtkVectorText beyond ASCII - solution

Michail Vidiassov master at iaas.msu.ru
Sat Dec 29 02:49:22 EST 2007


Dear All,

I have enquired on this list (vtkusers) about the sore state of
non-ASCII text support in VTK and got no reaction:

> are there anywhere around any patches to VTK to get more characters in 
> vtkVectorText (say Cyrillic)?

Thus I did some coding myself and got a vtkVectorText "on steroids",
that can display Cyryllic, Greek and some math (a STIX font was used).
You can see the results at
http://www.iaas.msu.ru/tmp/NewVectorText.pdf
http://www.iaas.msu.ru/tmp/NewVectorText.wrl
If anyone is interested I will put the code in minimal-decency state and 
post it here/put it there too.

As of now I did not change API or logic in any way,
font was converted offline and the text to show is just assumed to be in UTF-8.

> On the other hand, VTK uses FTGL intenally to render bitmap fonts on the 
> screen. But FTGL can make polygon fonts too.
> It must be easy enough to hack FTGL to make a polygon set
> for VTK, instead of feeding triangles to OpenGL directly.

And I have done that easy part. But now I lack both motivation and 
expertise to go any deeper into VTK to try on-the-fly rendering.
My search over archives suggests that text handling is some
untouchable mess and I was plain lucky that vtkVectorText was left 
neglected by developers, making enhancing it a one-step process.

             Sincerely, Michail



More information about the vtkusers mailing list