Windows rendering issues

OK, seeing some odd behaviors on Window using Java/VTK 6.3 (but also with 8.1.2 as well).

  1. In a vtkCaptionActor2D caption, the degree symbol (0x00B0) does NOT render, and it actually will cause the ENTIRE caption text to not render. This does not happen on the Mac or Linux.
  2. vtkPNGWriter flips the data along the x axis of the image (so top is bottom, vice versa). This also does not happen on Macs.

Any thoughts on what is going on here?

VTK 8.1.2 doesn’t support unicode, so extended characters depend on your locale CODE_PAGE setting.

Have you tried the latest build of VTK from master? It uses utf-8 strings. Displaying text/labels has not been addressed yet; however, since it appears to be working on Mac/Linux, the changes might resolve your issue.

Sadly, we can’t run with the master because VTK (or should I say the JOGL library, I think) is horribly broken on Mac for the OpenGL2 pipeline code (at least with how we use it in our code), so we haven’t been able to test with anything beyond VTK 8.1.2.

I’m not sure what CODE_PAGE is - is that a build switch when compiling VTK? What are the possibilities?

Here’s some information on setting the code page on Windows. https://docs.microsoft.com/en-us/cpp/c-runtime-library/code-pages?view=vs-2019
You could try altering your code page to see whether it affects the output. Even if that works, this approach is flawed since it breaks on any machine with a different code page setting.

Another option is to build VTK with Freetype. I haven’t had success with this either due to problems with the search paths in CMake on Windows, but I understand there is a superbuild for Paraview which compiles properly. My preliminary investigations suggest that Freetype will render the correct characters provided the correct font file is provided.

Please detail the steps to reproduce this issue. It would make a good test case for the UTF-8 support in VTK 8.2+ Perhaps the fix can be back-ported later.

You could also try setting the ActiveCodePage property in the manifest file for VTK 8.1.2, if you’re using Windows 10 (1903)

See some recent discussion here What is state of the art: Unicode file names on Windows