Font error in parts editor when reading schematic svg which is edited with inkscape



Now I am trying to edit parts schematic svg data.

When I tried to edit parts schematic svg without changing any font element with Inkscape. And read the svg file into parts-editor(schematic pane).
Then font-error is occured like this.

I compared the ‘before’ and ‘after’ svg files, There are differences in how to descript font names around ‘text’ elements.

In ‘before’ svg file, font names are descripted like this.

font-family=“Droid Sans”

In ‘after’ svg file, font names are descripted like this.

style=“font-family:Droid Sans;text-anchor:middle;”

In ‘after’ svg file, the font names are descripted as ‘font-family’ parameters in ‘style’ elements. Not in ‘font-family’ elements.
And some parameters are concatenated with semicolons.

I guess fritzing could not pick out the font names from ‘style’ elements, thus font names are ignored. Hence the error is occured.

Why can’t Fritzing recognize font namesin such svg files?
And how can I fix it?

Is this a bug in Fritzing? or Inkscape?

By the way, the svg file (for schematic) is made from copy of existing parts like ‘ICs’, not from scratch svg.


I received this error and did some investigation. Fritzing has various font handling workarounds for SVGs. It does handle font-family defined inside the style attribute; however, it doesn’t handle a ‘quoted’ font in that case. InkScape exports quoted font names in some cases (but not all).

I think you’ll find it was e.g. style="…font-family:‘Droid Sans’…" that causes the error.

I’ve submitted a pull request with fix:

The error was harmless in my case, as it will fall back to Droid Sans anyway, but certainly it was confusing! There appears to be other font handling issues which I’ll look into if I have the time.


Hi Historic_bruno.

Thank you for your hard work.

Now I’m looking foward to the next update.

By the way,
I have tried deleting all ‘px’ units in ‘style’ elements from the SVG file with text-editor.

When fritzing reads the file, it causes a warning message,too.
But the part-data works well without strange phenomenon / broken figure / strange size font.

If you don’t mind displaying the warning message, I think this modification can be a temporary method for this matter.



Been 2 years after and problem still remain. Where is a bug fix?


FZ is unsupported, it’s just some enthusiasts trying to get it up and running again.


@historic_bruno You are using opening and closing single quotes here. Was this some forum UI replacement, or do you really have a file like that?


While I’m not the OP, I’ve seen this construct (this was likely converted via the check parts script to remove the styles, note the double quotes on the Droid Sans which was likely added by lxml during conversion):

  font-family="'Droid Sans'"

Editing this in Inkscape and selecting this item then in xml editor select font-family and hit set (with no changes) causes Inkscape to convert it to a style (for CSS compliance) and removes the double quotes like this:

    style="font-size:60px;font-family:'Droid Sans';text-anchor:start;fill:#ffffff"

Some parts of Fritzing (most notably bendable legs) don’t support style commands (this is why the check script converts style commands to inline xml) so it is possible this issue is hitting one of those parts.