By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,544 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,544 IT Pros & Developers. It's quick & easy.

Looking for a HTML like rendering library (wishlist)

P: n/a

Hello,

I'm looking for a library that can do the following:

* Parse a simple structured text file (XML or HTML etc.)
* Render its output to an image
* I would like to give the maximum width of the image (but not the
minimum)
* I would like to use my custom TrueType fonts, and some basic
formatting: colors, underline, numbered and bulleted lists
* I would like to embed some PNG (transparent) images, and align
them inside the text
* The library should be able to calculate the size of the image
before rendering
* The library should be able to render the image into memory
* It should be reasonably fast
* It should be independent of windowing toolkits (PIL is okay)
Why I need this: create widgets in GUI applications, for example:

* A label that can display formatted text
* A new grid cell renderer that can display small images and text as
well
* Hint window (tooltip) that has formatted text and images
* Create automatic signatures for e-mails (not GUI related)
* etc

I tried to implement something similar in pure Python, PyXRP and PIL. I
could do it, but either it was too slow (10 frames per sec on 300x300
final size) or consumed too much memory.
Do you know any alternative?

Thanks,

Laszlo
Jul 10 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Laszlo Nagy wrote:
I'm looking for a library that can do the following:

* Parse a simple structured text file (XML or HTML etc.)
* Render its output to an image
* I would like to give the maximum width of the image (but not the
minimum)
* I would like to use my custom TrueType fonts, and some basic
formatting: colors, underline, numbered and bulleted lists
* I would like to embed some PNG (transparent) images, and align
them inside the text
* The library should be able to calculate the size of the image
before rendering
* The library should be able to render the image into memory
* It should be reasonably fast
* It should be independent of windowing toolkits (PIL is okay)
Why I need this: create widgets in GUI applications, for example:

* A label that can display formatted text
* A new grid cell renderer that can display small images and text as
well
* Hint window (tooltip) that has formatted text and images
* Create automatic signatures for e-mails (not GUI related)
* etc
After reading this, I still do not understand why you want to do this with
images. Virtually any GUI toolkit can display text, most can natively display
HTML, just look at Qt for a good example.

So why not just use the native features?

Stefan
Jul 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.