[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    [vtk-developers] vtkVectorText beyond ASCII - solution
From:       Michail Vidiassov <master () iaas ! msu ! ru>
Date:       2007-12-29 7:49:22
Message-ID: alpine.OSX.1.00.0712291024220.2395 () MacBook ! local
[Download RAW message or body]

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
_______________________________________________
vtk-developers mailing list
vtk-developers@vtk.org
http://www.vtk.org/mailman/listinfo/vtk-developers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic