Font in TextView

View: New views
3 Messages — Rating Filter:   Alert me  

Font in TextView

by Baloon man :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

  I am new to pygtk programming and found it very intuitive !!!  I am trying to find a way to set a local language font ( lohit kannada - ಕನ್ನಡ  ) for text view. How do I do this.

Thanks
-B

_______________________________________________
pygtk mailing list   pygtk@...
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: Font in TextView

by Frédéric Grollier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le jeudi 12 novembre 2009 à 18:00 +0530, Baloon man a écrit :
> Hello
>
>   I am new to pygtk programming and found it very intuitive !!!  I am
> trying to find a way to set a local language font ( lohit kannada
> - ಕನ್ನಡ  ) for text view. How do I do this.

Hello,
If I understand the question correctly, you should take a look at the
modify_font() method[1]. For example :
your_text_view.modify_font('lohit normal 12')

[1]
http://library.gnome.org/devel/pygtk/stable/class-gtkwidget.html#method-gtkwidget--modify-font

Fred.

_______________________________________________
pygtk mailing list   pygtk@...
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: Font in TextView

by Baloon man :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Frederic

  I would like to get some idea about how to get the "font description" for a specific font ( default font in the system and also a third party font installed at later point. )

  Another point is in my Fedora 11 system. I added one font in $HOME/.fonts directory. I can use those fonts to read the content written in that font in browser. But I am not seing them in xlsfonts command output. Is there any way I can get the font description of those fonts and use them for  text view. Or is there any method by which I can specify the font name ( phisical file name ) and give it as an input to textview .

Thanks
Salil

On Fri, Nov 13, 2009 at 2:52 AM, Frédéric Grollier <fred.grollier@...> wrote:
Le jeudi 12 novembre 2009 à 18:00 +0530, Baloon man a écrit :
> Hello
>
>   I am new to pygtk programming and found it very intuitive !!!  I am
> trying to find a way to set a local language font ( lohit kannada
> - ಕನ್ನಡ  ) for text view. How do I do this.

Hello,
If I understand the question correctly, you should take a look at the
modify_font() method[1]. For example :
your_text_view.modify_font('lohit normal 12')

[1]
http://library.gnome.org/devel/pygtk/stable/class-gtkwidget.html#method-gtkwidget--modify-font

Fred.

_______________________________________________
pygtk mailing list   pygtk@...
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


_______________________________________________
pygtk mailing list   pygtk@...
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/