threejs:中文字体的使用

此处的例子为:为一个平面添加中文字体。

在这里学习添加中文字体:
https://threejs.org/docs/#api/zh/geometries/TextBufferGeometry
https://github.com/mrdoob/three.js/tree/dev/examples/fonts
本处以免费开源可商用的字体为例子。
首先下载思源ttf字体。
http://www.diyiziti.com/download/220/

然后在转换字体的网页的网站,转换成json字体。
https://gero3.github.io/facetype.js/ (字体转换网站)
然后根据转换后的字体写中文字体,参考下方博客
https://blog.csdn.net/qq_29026209/article/details/73431442

猜你喜欢

转载自blog.csdn.net/weixin_42755384/article/details/90262404