Text in SVG appears wrong in Fritzing

I am working on creating a new part for a ID-20LA RFID reader to use in the Schematic view. My starting point is the ID-12 available in Fritzing. I have opened the ID-12 SVG in Inkscape and edited the connection labels. I have also edited the texts saying “ID” and “12” in the middle of the image to say “ID-20LA” with a bit larger text than the connection labels. The image is then saved as a “Normal SVG”. I have also installed and used the Droid Sans fonttype on my system.

Now in the Fritzing Parts Editor when I import this new image for the part the text “ID-20LA” appears very small with a wrong offset and does not look as it did in Inkscape. The connection labels appear normal. If I open the SVG in Explorer etc. it looks as expected. Can this be a bug in Fritzing? This is very frustrating as I have been trying everything with no luck.

Has anybody experienced the same thing or can someone guide me in the right direction for a solution on this?

Yep, I’m fighting with the same thing. If you are getting text created in Inkscape into fritzing (I can’t even do that with Inkscape created text!) all you likely need to do is edit the svg file with a text editor and remove the px from the font-size (any of the font items I expect) so the number becomes 80 instead of 80px. The px confuses Fritzing and the parts editor changes the font size to 0 (with thanks to Steelgoose who found this for me!) once the parts editor edits the part. If that doesn’t help, then its possible that Inkscape is using the trans function for text (which is the problem with Inkscape created text) which Fritzing doesn’t support, for that the only solution I’ve found is to duplicate already existing text created by Fritzing and modify that, Inkscape doesn’t seem to mess with the xml for that. Hope this helps!

Peter Van Epp

Hi @vanepp

Wow. That did the trick. I would have never found that solution my self. I also noticed that when duplicating and editing existing text in Inkscape it sets a “style” tag with all the styling. This tag is not on the other texts already in the image. But I removed the “px” from the font-size and that worked. Thank you very much for your quick reply.

The fritzing file format doc

has that and a variety of other useful suggestions about Inkscape issues, but that said I found this while creating (which I haven’t finished yet) my first part with much help from steelgoose and oldgrey. I’d been seeing the issue on the second (not the first!) edit of the part and when it did it to steelgoose when he was doing an edit of my part he discovered that font was set to zero length. With experimentation I finally got a part create that failed first edit then tried things (this among the first because of the suggestions in the format file) til I found a solution. Once
I get my first part properly finished I’m planning on writing it up as a guide to other people trying to learn to create parts because it is neither easy nor well documented.

Peter Van Epp

Another trick to address this is… In Inkscape… Select all your text elements, then click Path->Object to Path. All font styles and sizes should be preserved in FZ.