[aframe]如何在aframe中显示汉字?

[aframe]how show chinese characters in aframe?

我想用'text'属性显示汉字,但是汉字显示不出来。例如:

<a-entity text="align:center;value: 返回back; "></a-entity>

您需要获取包含中文字符的字体文件。然后用Hiero (https://github.com/libgdx/libgdx/wiki/Distance-field-fonts).

生成SDF字体

https://aframe.io/docs/0.5.0/components/text.html#generating-sdf-fonts

或者,text-geometry component, you can generate a font set with Chinese characters using FaceType.js

的过程类似

使用MSDF font generator (source) then load that fond in the text component.