Fonts render differently on different machines (WinXP)

Post questions on how to use or achieve an effect in Inkscape.
fizzybrain
Posts: 1
Joined: Sun Oct 25, 2009 11:17 pm

Fonts render differently on different machines (WinXP)

Postby fizzybrain » Sun Oct 25, 2009 11:54 pm

SUMMARY: How do I make Inkscape command-line render use the desired font? What is the most efficient way to specify how text should be rendered?

'ello.

I have written Perl code to generate several thousand SVG files which form an animation. These sit in a folder, and I have several machines which look at that folder through my network, pick an SVG file and render it into a PNG using Inkscape at the command line.
There are hundreds of text items on each page, but I have not specified the font face for any of them, as the font face which appeared when I was developing the SVG-generating code (on machine "A") seemed good and I assumed this was a default built-in font.

However, now that I am using different machines to render the SVG files I get problems - machines B and C give me the results I expected, but the text on the files rendered by machines D and E looks different (though the same as each other - i.e. B & C use one font which is the same as A, while D & E use another).
Looking around I think I found that the default (for SVG? Inkscape?) font is Bitstream Sans Vera, but I don't think that was installed on A and it was falling back to Microsoft Sans, so in fact I had been using a fallback when developing my code, and it was fine.

I tried deleting Bitstream (ttf) from D & E, but I get similar results (D & E both appear to have Microsoft Sans). When I open a sample file using the full Inkscape GUI on each machine, the fonts appear similarly inconsistent, though they all show up as "Sans".

Does Inkscape use a default font if no font face is specified? Is this a system TTF font? A built-in font? Could this have been changed in two of these machines? Do I need to "remind" my various copies of Inkscape what that is? (it seems unlikely as I have copied a portable installation of Inkscape to all the machines, so they should all be the same).

Failing that - can I specify a default font in an SVG document? I don't think I can go back and specify the font-face for each text item, but I could probably add a default font definition at the top of each SVG page. I'd like to know how to do this anyway, as it is clearly the safe solution for future developments. Can this be done, *without* having to change each font item (of which there are about a million) individually? i.e. ideally I could add some defining lines at the top of the SVG, but I wouldn't have to change each item to *specify* that each item should use the font I have defined.

As a last resort, what is the most efficient way to specify how text should be rendered? If it comes to it, I can alter my perl code and regenerate the SVG files, but it takes about a day to do so and a day to render them, so I'd rather fix the ones I've already got at this stage.

Thanks in advance for any help

Return to “Help with using Inkscape”