Hi Mark,
On Wed, May 13, 2009 at 08:45:45PM -0600, Mark Dewey wrote:
> I want to put in a plug for upping the SVG support priority (if user 
> demand has any effect on this, at least).
> 
> I want to put styled text in SVG so I can display the content in a GUI 
> application more readily (the text should be scalable, and the 
> background should be able to be transparent: especially if the SVG file 
> is an image of text only).
> 
> Anyway, this would make it easy to do certain types of text rendering in 
> games: just style it, convert it to a transparent SVG and layer it over 
> the game's images.
> 
> If you have ideas on how to do this now, before that feature becomes 
> available, feel free to let me know. I'm thinking of using another 
> program to convert to SVG, but that would likely be slower than what the 
> future of this will offer—or will it? As long as it takes less than a 
> half-second per rendering (with each rendering being about a paragraph 
> of text), it should be fine. Is this a reasonable speed requirement for 
> what PyX or conversion methods (eps to svg or pdf to svg) would be able 
> to offer? If not, I'll have to try something else.
> 
> I guess scalability isn't a huge issue since the image can be redrawn at 
> a different size without having to scale the SVG file itself, although 
> I'd prefer to keep scalability intact—so, if you know something that 
> converts to PNG or some other image format that supports transparency 
> (not GIF, though), feel free to let me know. Thanks!

I'm not sure that's really doable using PyX. PyX is concentrated (in my
understanding) on creating high-quality images - memory and
runtime requirements are completely ignored for now. In order to render
a text, PyX starts a TeX / LaTeX interpreter to write the text and then
analyzes the output of TeX / LaTeX and translates it into the output
format.

Well, I just tried it: executing the example textbox.py and converting
the resulting pdf to svg (using pdf2svg) needs on my machine 0.24s. So
probably its fast enough for you (if you create many texts in series,
it's not necessary to reload python, Pyx, Latex, ... such that the
speed should increase...

Good Luck,

Axel

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to