Persian textinput in kivy?

32 views
Skip to first unread message

Mahmud Kasaei

unread,
Jan 5, 2015, 11:19:54 AM1/5/15
to kivy-...@googlegroups.com
i need to add a Unicode TextInput in kivy, that enter in it Persian character, i do this But when i enter in textinput Persian character the character don't show correctly i attach an example of textinput screen.
my .py file is:

import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.textinput import TextInput

class GUI(Widget):

    def __init__(self, **kwargs):
        super(GUI, self).__init__(**kwargs)

        text_input=TextInput()
        text_input.font_name = "fonts/BNAZANIN.TTF"
        self.add_widget(text_input)


class MyApp(App):
    def build(self):
        return GUI()

if __name__ == '__main__' :
    MyApp().run()
######################################################
Please Help me.?
Persian_textinput.jpg

Carsten Thielepape

unread,
Jan 5, 2015, 12:34:28 PM1/5/15
to kivy-...@googlegroups.com
I think, you have to register the font by

LabelBase.register
Reply all
Reply to author
Forward
0 new messages