当前位置: 首页 > 工具软件 > Armory > 使用案例 >

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

米浩穰
2023-12-01
  • 替换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中输入中文。
 类似资料: