FoieGras- First look at how the text rendering

After about a months of time into the GSoC project, I was able to finish the first significant improvement in the project that happened from my side. For a long time I was wandering here and there testing one thing or the other to see what’s working best and finally had enough of it.

For now FoieGras (The code name of the editor we are developing) text engine is capable of these capabilities. It can render some given tags but only inline tags. It can hide and show tags so if the user wanted to see tags and work with tags it’s possible. Also you can add more tags and configure the style tags are rendered using a configure file. I think it’ll be the main configure file regarding text rendering functions. After phenatic ( http://phanatic.hu ) has released the first UI part we’ll be able to map the menu events to this text rendering functions and present the first release of FoieGras. :-)

To tell you how the implementation of FoieGras is done, well it’s all done using python and pygtk as the wrapper for GTK to do UI things. First I planned on implementing the text renderer using some thread system, giving a thread to take care of each tag. But soon I understood that it’s a waste of time and resources so thought of a better way. Now the text rendering is done through the XMLparser that comes with python and so far it’s working nicely.

Also my mentor ( Dr. Don Scorgie - yeah, he is now a doctor :-) . Congrats Don ! ) is giving me a good support and good ideas. FoieGras now has a repository in GNOME svn and I’ve created a branch for tags rendering implementations and copied my works there, So you can check it. And another news is that I’m planning to goto GUADEC in next 14th July and I hope it’ll be fun and be able to discuss more about FoieGras there with the team and also hack FoieGras there.

FoieGras-1

FoieGras-2

FoieGras-3

7 thoughts on “FoieGras- First look at how the text rendering

  1. Alex Jones says:

    Hey man.

    Try disabling hinting in your font settings. You’ll get much less sucky bold s’s!

  2. Looks nice, but it would be cool if you provided links to the fullsize image files.

  3. […] FoieGras- First look at how the text rendering After about a months of time into the GSoC project, I was able to finish the first significant improvement in the […] […]

  4. voyou says:

    That looks interesting; I’ve been playing around with something vaguely similar (a WYSIWYG-ish XML editor) myself. One minor point about the code: when you’re applying the tags to the buffer in xmlparser.py, you build the call to ‘insert_with_tags_by_name’ as a string, then exec it, which seems a little ugly. Couldn’t you use the asterisk operator, and do:

    self.buffer.insert_with_tags_by_name(self.iter3,data, *self.tag_stack)

  5. luckycala says:

    Alex, Sorry for that. Issue is fixed.

    Adam, here are the links.
    http://luckycala.wordpress.com/files/2007/07/screenshot.png
    http://luckycala.wordpress.com/files/2007/07/screenshot-1.png
    http://luckycala.wordpress.com/files/2007/07/screenshot-2.png

    voyou, Thanks a lot for reviewing the code. You are obviously correct and when I commit the works again I’ll surely edit this with some more errors in the code. Thanks again for the help.

  6. oh i can’t believe what i’m seeing with my eye. Andreina Cecilio.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>