Hi Ferdinand,
On Thu, 2012-02-09 at 10:05 -0800, Ferdinand Ramirez wrote:
This is related to the previous post I made.
Is there a way to convert from the command line, a string to an svg file containing the outline of the glyphs that represent the string?
This should be possible but as Matt mentioned, it might take use of a python script.
The general recipe I'd approach it with:
- Create an SVG with some sample text in it, using the font / font size / canvas size you're interested in - Give the sample text a recongizable ID... e.g., "mytext" - Save the sample SVG - Write a python script using one of the available XML libraries in python to open up the SVG, look up item with ID "mytext", and replace the string in that item with whatever string you want in there - Write out the SVG - Rinse and repeat until you have a series of SVGs that have the strings in them that you want - Run command-line inkscape with the -T or --export-text-to-path option on all of the SVGs to get the glyph outlines
This is just what I would think to do. It might not be the best possible way but it should work. I've done similar python scripts before, using the XML DOM to look up a specific element and replacing the string (we use this process to translate graphical banners in Fedora.) I've not relied on the -T / --export-text-to-path option on the command line before but have no reason to suspect it wouldn't work the way you're looking for it to.
Good luck, ~m