In this article forum post we details detail how to replace the HOOPS Visualize Navigation Cube labels with UTF-8 characters. This will be useful to write labels in Cyrillic, Chinese, Japanese, Korean or to use any other wide size characters.
Make sure the source code file is encoded to UTF-8 without BOM
Any advanced text editor, such as Notepad++ will let you save a file with the desired encoding.
Example:
In Notepad++ go to Encoding menu
Select UTF-8
Save the file
...
Make sure to select UTF-8 without BOM. Depending on the software it may be called by other name: Note
UTF-8
UTF-8 sans BOM
UTF-8 without BOM
Identify a fond in the system corresponding to the language you want to use
You will need to set the font for the Navigation Cube to display correctly the labels.
Here is a list of default UTF-8 Windows font: https://docs.microsoft.com/en-us/windows/uwp/design/style/typography#fonts-for-non-latin-languages
Use the NavigationCubeControl to customize the cube
Code snippet example
Replacing labels with Korean characters.
Malgun Gothic is user-interface font for Korean.
Code Block |
---|
GetCanvas().GetFrontView().GetNavigationCubeControl().SetText(
"안녕 ", "안녕 ", "안녕 ",
"안녕 ", "안녕 ", "안녕 ",
TextAttributeKit().SetFont("Malgun Gothic")); |
...