encode string for VtkVectorText

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

encode string for VtkVectorText

Jose Barreto
How does vtk interpret strings?

I have a vtkVectorText attached to a vtkFollower and am trying to pass a string in latin1 format (I tried with utf8 too) but this fails.

VtkVectorText :: SafeDownCast (vtkPolyDataMapper :: SafeDownCast (Text-> GetMapper ()) -> GetInputAlgorithm ()) -> SetText ("ÓÉóéàÁÁá);
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: encode string for VtkVectorText

David Lonie-2
vtkVectorText is hardcoded to only support a very limited character
set, since it manually draws the text as polydata.

The other text rendering classes (vtkTextActor, vtkTextActor3D,
vtkBillboardTextActor3D, vtkTextMapper) all support UTF-8 when a
custom font file is loaded (see vtkTextProperty::SetFontFamily docs).

On Tue, Mar 21, 2017 at 2:45 PM, Jose Barreto <[hidden email]> wrote:

> How does vtk interpret strings?
>
> I have a vtkVectorText attached to a vtkFollower and am trying to pass a
> string in latin1 format (I tried with utf8 too) but this fails.
>
> VtkVectorText :: SafeDownCast (vtkPolyDataMapper :: SafeDownCast (Text->
> GetMapper ()) -> GetInputAlgorithm ()) -> SetText ("ÓÉóéàÁÁá);
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/encode-string-for-VtkVectorText-tp5742577.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Loading...