使用pygame在android上显示文字时,意外发现汉字不能正常显示,使用中文字体也不行,后来在网上请教了麦城_lookhere,他提供了一个方法,就是使用:

screen.blit(font.render(u"\u6d4b\u8bd5", True, (0, 0, 255)), (50, 50))

经测试,可以正常显示汉字了。

注意android平台上的python现在好像只有2.x版本。

非常感谢麦城_lookhere.

更多相关文章

  1. 箭头函数的基础使用
  2. NPM 和webpack 的基础使用
  3. Python list sort方法的具体使用
  4. 【阿里云镜像】使用阿里巴巴DNS镜像源——DNS配置教程
  5. Android中bindService的使用及Service生命周期
  6. Android内存分析和调优(下)
  7. Android的线程使用来更新UI----View的几种更新方法(Thread、Hand
  8. android使用全局变量的两种方法
  9. android、ios与服务器端php使用rsa加密解密通讯

随机推荐

  1. com.android.support:support-fragment‘
  2. Android动态生成按钮样式
  3. 【063】◀▶ Android(安卓)(I) - 控件和
  4. Android(安卓)Widget:TextView
  5. Activity 透明
  6. Android(安卓)在一个应用中如何启动另外
  7. android文件下载
  8. Android(安卓)Studio 配置
  9. android Intent打开各种类型文件((PDF、wo
  10. Duplicate jar entry [android/support/d