Forum Bugs

font-family in SVG

acebal
Hello:

I think there is a problem with the property font-family when applied to the elements of SVG. If, for example, I write:

<text font-family="Lucida Console, monospace">Blah, blah...</text>


It doesn't work. But if instead I only specify the generic family (<text font-family="monospace">Blah, blah...</text> then the specified font family is applied.

Do you know the reason? Thank you very much in advance.

César
mikeday
Hi César,

It seems that there is a bug in the SVG parser such that it is not correctly handling multiple comma-separated font names in the font-family property. We will fix this in the next release of Prince. In the meantime, the only workaround is to specify only one single font.

Thanks for reporting the issue! :)

Michael
acebal
You're right, Michael: the problem had not to do with the font names or family names, but with the fact of specifying more than one font. I have changed it to <text font-family="Lucida Console"> and now it works.

Thanks for your reply!