AB4D Forum
Displaying Non-Ascii Characters in TextVisual3D class - Printable Version

+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9)
+--- Thread: Displaying Non-Ascii Characters in TextVisual3D class (/showthread.php?tid=4160)



Displaying Non-Ascii Characters in TextVisual3D class - michelle.barnett - 12-13-2019

We have an application that is translated into Korean, Japanese and Chinese. The TextVisual3D class is restricted only to some ascii characters, which means that we cannot translate the labels in our 3D visualisations into these languages.

Would it be possible to extend the class to support unicode characters?


RE: Displaying Non-Ascii Characters in TextVisual3D class - abenedik - 12-13-2019

This was already requested by some other customers but this is not possible because the TextVisual3D is using a "font definition" that was created for plotters and defines the lines that are needed to draw each character. That font defined lines only for the standard characters. Therefore it is not possible to use TrueType or some other modern font definition for TextVisual3D.

But you can use TextBlockVisual3D that renders text to bitmap and for that it uses the standard WPF's TextBlock that can render any font that is installed on the system. Note that if you have multiple TextBlockVisual3D, you will need to apply transparency sorting - those closer to the camera needs to be rendered after those that are farther away. Otherwise some TextBlockVisual3D may hide those that are in front of them (see Utilities \ Transparency problem in Ab3d.PowerToys samples).