[Armory]2d canvas如何支持中文显示

  • 替换font_default.ttf 为 unifont字体 (比如从这里下载一个:unifont )

  • 修改Kha源码

git源码位置: https://github.com/Kode/Kha/blob/master/Sources/kha/graphics2/Graphics.hx#L141

public static var fontGlyphs: Array<Int> = [for (i in 32...256) i];

修改为:

public static var fontGlyphs: Array<Int> = [for (i in 32...40869) i];
  • 在blender中完善canvas时应该不能直接输入中文,可以在对应的源码_canvas.json中输入中文。
发布了378 篇原创文章 · 获赞 1039 · 访问量 243万+

猜你喜欢

转载自blog.csdn.net/moxiaomomo/article/details/104471942
今日推荐