Looking for a HTML like rendering library (wishlist)

Stefan Behnel stefan.behnel-n05pAM at web.de
Tue Jul 11 05:46:06 EDT 2006


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



More information about the Python-list mailing list