[vtkusers] Special letters vtkTextSource()

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Nov 24 14:24:50 EST 2010


Hi Bruno,

On Wed, Nov 24, 2010 at 9:24 AM, Bruno Lara Bottazzini
<bruno.bottazzini at cti.gov.br> wrote:
> Hi there,
> How are you doing?
>
> I've been going through a problem that unfortunately I couldn't solve.
>
> I'm a developer of a software called Invesalius and there is a commentary tool
> that I'm developing.
> In my language(Portuguese) we use special letters like ç, ~ and ´.
> When a I set a string like:
> "Olá"
> The "á" doesn't appear on the widget.
> It is shown just this "Ol" (Without á).
>
> How can I fix this?
>
This is due to the lack of unicode support in VTK's text actor. I have
been working on improving this situation, and have some code checked
in for the 2D rendering that can render extended character sets. It
currently relies on the loading of external fonts, and I have not
added a robust mechanism for setting or finding these fonts.

Which particular class are you trying to use to set these characters?
My plan is to accept UTF8 encoded strings at present, and I am going
to add an extra property to the TextProperty for the font path. It is
on my list of things to get to in the near future.

Marcus



More information about the vtkusers mailing list