[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] SVG and Pango support



On, Thu Apr 19, 2007, Noah Kantrowitz wrote:

> As OLPC is in need of both SVG and Pango support in Pygame, I am looking
> at making wrappers for SDL_svg and SDL_pango. Rene mentioned that
> someone has some code for using Cairo, is this online somewhere? Also,
> how would people feel about this as an addition to pygame itself vs. a
> secondary library?

There is an Cookbook entry using py-cairo at
http://www.pygame.org/wiki/CairoPygame?parent=CookBook.

I wrote an own small module, which uses libsvg-cairo to load and
renderer SVG graphics as pygame surfaces. As it's 'not really' my own
code, I'll contact you in private about it ;-).

A direct addition to pygame should be handled using the
pygame.image.load() methods and the support should be optional. Using
libsvg-cairo this could be achieved pretty fast, but I there does not
seem to be any support for other platforms besides Win32, the common
Unices and probably MacOS X.
I wonder for which platforms SDL_svg is currently available.

Regarding SDL_pango I already started some code to enhance the font and
text rendering support in pygame. Pango brings some really important
features such as (nearly) correct complex script handling, good text
layout and formatting capabilities and more. My code however currently
does not work and will take some more time to be suitable for
pygame.

Regards
Marcus

Attachment: pgp2zOvudDN85.pgp
Description: PGP signature