Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

In this article we details 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:

  • 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.

GetCanvas().GetFrontView().GetNavigationCubeControl().SetText(
		"안녕 ", "안녕 ", "안녕 ",
		 "안녕 ", "안녕 ", "안녕 ",
		 TextAttributeKit().SetFont("Malgun Gothic"));

  • No labels