Unicode text

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unicode text

Rustem Khabetdinov
Hello.

Is there any possibility to use unicode chars?(without using vtk2DActor)

Best Regards,
Rustem Khabetdinov.

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Unicode text

David Lonie-2
On Thu, Aug 25, 2016 at 7:51 AM, Rustem Khabetdinov
<[hidden email]> wrote:
> Hello.
>
> Is there any possibility to use unicode chars?(without using vtk2DActor)

I'm not sure what you mean by vtk2DActor, but it is possible to render
unicode text by configuring the vtkTextProperty's FontFamily to
VTK_FONT_FILE and setting FontFile to a font file that supports the
character you wish to use. The default fonts in VTK do not support
much if any unicode, so you'll need to provide a font file.

This approach will work for vtkTextActor, vtkTextActor3D, and vtkTextMapper.

Example: https://github.com/Kitware/VTK/blob/master/Rendering/FreeType/Testing/Cxx/TestFreeTypeTextMapperNoMath.cxx#L148-L159

HTH,
Dave
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Unicode text

Sid Murthy
Hi - I was wondering if this is still the case for the latest VTK version where unicode characters for text display are not supported by default? Currently we use Arial Unicode MS - which works fine - but are there freely licensed versions that would work?

On Thu, Aug 25, 2016 at 9:33 AM David Lonie <[hidden email]> wrote:
On Thu, Aug 25, 2016 at 7:51 AM, Rustem Khabetdinov
<[hidden email]> wrote:
> Hello.
>
> Is there any possibility to use unicode chars?(without using vtk2DActor)

I'm not sure what you mean by vtk2DActor, but it is possible to render
unicode text by configuring the vtkTextProperty's FontFamily to
VTK_FONT_FILE and setting FontFile to a font file that supports the
character you wish to use. The default fonts in VTK do not support
much if any unicode, so you'll need to provide a font file.

This approach will work for vtkTextActor, vtkTextActor3D, and vtkTextMapper.

Example: https://github.com/Kitware/VTK/blob/master/Rendering/FreeType/Testing/Cxx/TestFreeTypeTextMapperNoMath.cxx#L148-L159

HTH,
Dave
_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Unicode text

VTK - Users mailing list
I have no any problems with Unicode in QVTKWidget, but it not works (for me) with vtkOpenGLWidget and vtkOpenGLNativeWidget 



From: Sid Murthy <[hidden email]>
To: David Lonie <[hidden email]>
Cc: Rustem Khabetdinov <[hidden email]>; "[hidden email]" <[hidden email]>
Sent: Tuesday, February 26, 2019 7:15 PM
Subject: Re: [vtkusers] Unicode text

Hi - I was wondering if this is still the case for the latest VTK version where unicode characters for text display are not supported by default? Currently we use Arial Unicode MS - which works fine - but are there freely licensed versions that would work?

On Thu, Aug 25, 2016 at 9:33 AM David Lonie <[hidden email]> wrote:
On Thu, Aug 25, 2016 at 7:51 AM, Rustem Khabetdinov
<[hidden email]> wrote:
> Hello.
>
> Is there any possibility to use unicode chars?(without using vtk2DActor)

I'm not sure what you mean by vtk2DActor, but it is possible to render
unicode text by configuring the vtkTextProperty's FontFamily to
VTK_FONT_FILE and setting FontFile to a font file that supports the
character you wish to use. The default fonts in VTK do not support
much if any unicode, so you'll need to provide a font file.

This approach will work for vtkTextActor, vtkTextActor3D, and vtkTextMapper.

Example: https://github.com/Kitware/VTK/blob/master/Rendering/FreeType/Testing/Cxx/TestFreeTypeTextMapperNoMath.cxx#L148-L159

HTH,
Dave
_______________________________________________
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:
https://vtk.org/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:
https://vtk.org/mailman/listinfo/vtkusers