Hi Michael,
Support for unicode character sets was exposed in VTK master a couple of
months ago. The tricky bit is that you must provide a specific font file,
as the fonts currently embedded in VTK only support ASCII characters (this
will likely change in the future). The current way of enabling unicode
fonts is to configure vtkTextProperty with the desired font file, for
instance:
vtkTextProperty *tprop = ...;
tprop->SetFontFamily(VTK_FONT_FILE);
tprop->SetFontFile("/path/to/some/font/file.ttf");
Do this for the actors that you want unicode for, and the proper glyphs
will be pulled from the supplied font file. This should work everywhere
except for vtkVectorText, which uses an entirely different method of
rendering text.
See TestChartUnicode and TextContextUnicode in the Charts/Core module for
examples.
BTW, I recommend grabbing the DejaVu true type fonts -- they are rather
openly licensed, and they are what we use internally for testing.
Hope this helps,
Dave
On Wed, Nov 20, 2013 at 12:52 PM, Michael Xanadu <
Post by Michael XanaduDear Friends,
What is the current state concerning the support of unicode in VTK? E.g.
is it possible to display unicode charcters via vtkCaptionActor2D or
vtkCornerAnnotation? If yes, which requirements do I have to meet (version
etc.)?
I have not found any clear information about the topic via google so far.
Thanks in advance,
Michale
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
http://www.vtk.org/mailman/listinfo/vtkusers