Skip to content

Instantly share code, notes, and snippets.

@ckhung
Last active July 6, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckhung/2800b4090fd9228f36fd to your computer and use it in GitHub Desktop.
Save ckhung/2800b4090fd9228f36fd to your computer and use it in GitHub Desktop.
在 kivy 程式裡面顯示中文
title=zh_TW_test
author=ckhung
orientation=landscape
# -*- coding: utf-8 -*-
# http://newtoypia.blogspot.tw/2015/07/kivy.html
import kivy
from kivy.app import App
from kivy.uix.button import Button
import kivy.resources
kivy.resources.resource_add_path('.')
class MyApp(App):
def build(self):
return Button(text=u'大大們安安', font_size=60, font_name=kivy.resources.resource_find('ukai.ttc'))
if __name__ == '__main__':
MyApp().run()
@TTFISHDES
Copy link

喔喔喔了解~,謝謝你拉~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment