[vtk-developers] wishful thinking about text in VTK (was vtkVectorText beyond ASCII - solution)

Michail Vidiassov master at iaas.msu.ru
Thu Jan 10 15:05:40 EST 2008


Dear All,

On Thu, 10 Jan 2008, Sean McBride wrote:
> On 1/9/08 7:56 AM, Will Schroeder said:
>> Having said that, I know I would personally welcome a vision.
>
> String handling is a rather complex subject that many people do not
> understand the details of
>
> So one thing VTK needs is a cross-platform, open source, Unicode-aware
> string class.  There are no doubt several.

The other (old-style) option is to use an external application that
can produce device-independent output and make a VTK "driver" for it.

For example OpenDX can use TeX for typesetting by parsing DVI
(DeVice Independant ;) files
http://www.njph.f2s.com/dxfontutils/

A somewhat surprising option is ditroff (device independant troff).
Its output format is rather simple - move there, select that font,
print that glyph. The development versions of groff and Heirloom
ditroff can typeset Latin/Cyrillic/Greek Unicode.
Groff requires font metrics in its own format, Heirloom reads
otf/ttf/afm at runtime.
The additional advantage is that the roff markup language is
rather simple, some old article of Kernighan said that a secretary 
could learn how to typeset mathematics with it in about an hour.

In this way VTK has to know only how to output untypeset strings.
That will serve most needs for fast changing text.
Since most typeset labels are not likely to be fast changing at runtime
the time and resource costs of calling an external application can be 
ignored.

  Sincerely, Michail



More information about the vtk-developers mailing list