[vtkusers] Unicode text

Leonid Dulman leonid_dulman at yahoo.co.uk
Wed Feb 27 08:54:55 EST 2019


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

      From: Sid Murthy <sid.murthy at gmail.com>
 To: David Lonie <david.lonie at kitware.com> 
Cc: Rustem Khabetdinov <rustem.khabetdinov at gmail.com>; "vtkusers at vtk.org" <vtkusers at vtk.org>
 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 <david.lonie at kitware.com> wrote:

On Thu, Aug 25, 2016 at 7:51 AM, Rustem Khabetdinov
<rustem.khabetdinov at gmail.com> 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


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190227/0d10afbf/attachment-0001.html>


More information about the vtkusers mailing list