Chinese fonts does not show correctly

Chinese fonts does not show correctly

yuan_zhang
Not applicable
46 Views
4 Replies
Message 1 of 5

Chinese fonts does not show correctly

yuan_zhang
Not applicable

[ FlexSim 16.1.2 ]

Dear all,

There are many Chinese fonts in the Object "Text" does not show correctly, I tried to update the windows font, but did not completely solve this problem.Our users want to display in Chinese, is there any way to solve this problem? Or is there any font that you can provide me?

Thanks.

6653-20170511165206.png

0 Likes
Accepted solutions (1)
47 Views
4 Replies
Replies (4)
Message 2 of 5

philboboADSK
Autodesk
Autodesk
Accepted solution

FlexSim's 3D text renderer reads the contours from the font file and does its best to tessellate those outlines into 3D shapes. As you noticed, some Chinese characters do not appear correctly.

You could instead use the drawflattext() command in an object's Custom Draw trigger to draw text in the 3D view. That command converts the font glyphs into pixelated textures instead of triangle-tessellated 3D shapes.



Phil BoBo
Sr. Manager, Software Development
Message 3 of 5

jing_chen
Not applicable

Hi,Bobo. Thanks for your reply.

My computer can not show any Chinese character normally. I had tried a lot of methods to solve it, including reinstall the system, update the graphics card, and so on. But fails.

No matter which version of FlexSim I use(including V2017.1.2), it can not show Chinese character(well it can show the English correctly). As I know, Some Chinese users have the same problem.

6696-chinesefontpng.png

Learning from your answer, I try to use drawflattext() to solve it. However not quite understand about using drawflattext(). Could you please give me an example?

6695-flattext.png

Message 4 of 5

philboboADSK
Autodesk
Autodesk

For Chinese characters to be displayed in the 3D view, you need to ensure that you have the Arial Unicode font installed in Windows. The file that FlexSim uses is C:\Windows\Fonts\arialuni.ttf

6706-arialuni.png

Also, you need to ensure that the "Language for non-Unicode programs" is set to Chinese in the Windows Region dialog. This is required for rendering non-ASCII characters with drawflattext() or in the object names. Prior to 17.1, this was also required to draw 3D text with Chinese characters.

6705-region-setting.png

The documentation for drawflattext() has example code in it:

if (!param(2)) {
	setdrawnamefunction(80, 15, c, param(1), 1);
} else {
	fglTranslate(-40, -15, 0);
	drawflattext("暂存区");
}

6704-chinese-text2.png



Phil BoBo
Sr. Manager, Software Development
Message 5 of 5

jing_chen
Not applicable

Thanks a lot !!! It solve the problem which trouble me for a long time.

By the way, example code of drawflattext() only shows in Version2017 or further.

0 Likes