Bauteile- Editor, Bild als Ansicht laden, Probleme mit Schriftarten

Liebe community,

Ich habe folgendes Problem:

Ich habe ein neues Bautei mit dem Bauteile- Editor bei Inkscape erstellt. Ich habe Textfelder benutzt um die Pins des neuen Bauteils zu beschriften. Hierbei habe ich die Schriftart Droid Sans benutzt, wie es empfohlen wird. Diese habe ich sogar auf der Fritzing-Website heruntergeladen. Nach dem Gestalten des Bauteils bei Inkscape habe ich es bei Fritzing hochgeladen. Dann kommt die Meldung:
“Fritzing unterstützt derzeit nur OCRA und Droid- Schriftarten–diese haben die Schriftarten in ‘C:/Users/lonsk/OneDrive/Desktop/Soundinstallation Skulpturenpark/YX5300-MP3- Player normales svg.svg’ ersetzt.”
Die svg- Datei wird zwar dann bei Fritzing hochgeladen (per Bild als Ansicht laden) aber die Größe und Position des Schriftfeldes stimmen nicht mehr. Das nervt extrem, das Programm ist so für mich unbrauchbar und ich sehne mich nach meinen alten Bleistift- Schaltplänen:D Ich will aber nicht aufgeben, weil das Erstellen der Schaltpläne mit Fritzing viele Vorteile bereit hält, denke ich.

Deshalb frage ich: Hatte jemand das selbe Problem und hat geschafft es zu beheben oder eine Idee wie das funktioneren könnte?

Außerdem würde mich noch folgendes interessieren:
Gibt es irgendwo eine Datenbank, in der man weitere Bauteile für Fritzing herunterladen kann, oder eine Datenbank mit Bildern als Ansichten von Bauteilen, die mit Inkscape erstellt wurden? Ich würde mich sehr über einen Link freuen, ich habe bisher noch nichts gefunden.

Herzliche Grüße und einen guten Rutsch ins neue Jahr!

LG Leonardo

von Google Translate

If you upload the part file (fzp) here, we can have a look at it. That is button 7 on the post menu. Which version of the Fritzing program are you using? There have been a few releases in the last couple of years that might have differences.

Some possibilities:

  • Inkscape puts 2 references to font name in the file for each text element. The 2nd (optional) reference is only partly recognized by Fritzing, which can cause the automatic replacement message
  • (At least) older versions of Fritzing do not handle font sizes specified as “px” units.
  • Inkscape uses a lot of nested groups with transforms. That has been known to cause problems in some cases. There are ways to get Inkscape to clean that up when saving.

Danke für Deine Antwort!

Meinst Du das Hochladen so, oder anders?:
YX 5300 MP3- Player Modul.fzpz (6.4 KB)

Ich habe folgende Fritzing Version:
Version 0.9.9
(bCD-348-0-f0af53a9 2021-09-22) 64 [Qt 5.15.2]

Kannst Du mir nochmal genauer erklären wie ich das Problem lösen könnte?

LG Leon

Yes the .fzpz file is the correct upload. Unzipping it gives us the files (the .fzp and 4 svg files) of your part. For me this part works correctly. Here is the breadboard svg file displayed in Inkscape. It appears to be correct, except it is missing the layerId (but that will only stop it from exporting as an image, it shouldn’t cause your reported problem!) The change to the layer id is circled in red. If the units (circled in green had been in px, instead of mm that may have caused scaling problems but it won’t in this case.

Then I loaded your part in to Fritzing, edited it with the parts editor and loaded the breadboard svg and saved the resulting part. Neither part complains about the fonts and both appear identical (and identical to the svg!)

edit: forgot to include the Fritzing output, 1 is your original .fzpz and 2 is the file with the breadboard svg added with parts editor!

If this doesn’t match the original svg that you made in Inkscape, then please upload that svg via the upload button and I will have a look at it to see if we can figure out what is going wrong. As well there is already a Fritzing part for this unit here (found by a google search of the form “fritzing part yx5300 mp3 player module”):

Peter

via google translate

Ja, die .fzpz-Datei ist der richtige Upload. Durch das Entpacken erhalten wir die Dateien (die .fzp- und 4 SVG-Dateien) Ihres Teils. Bei mir funktioniert dieser Teil richtig. Hier ist die in Inkscape angezeigte Steckbrett-Svg-Datei. Es scheint korrekt zu sein, außer dass die Layer-ID fehlt (aber das verhindert nur den Export als Bild, es sollte nicht Ihr gemeldetes Problem verursachen!) Die Änderung der Layer-ID ist rot eingekreist. Wenn die Einheiten (grün eingekreist) in px statt in mm angegeben waren, kann dies zu Skalierungsproblemen geführt haben, aber in diesem Fall nicht.

Dann habe ich Ihr Teil in Fritzing geladen, es mit dem Teileeditor bearbeitet und das Steckbrett-Svg geladen und das resultierende Teil gespeichert. Kein Teil beschwert sich über die Schriftarten und beide sehen identisch aus (und identisch mit der SVG!) um zu sehen, ob wir herausfinden können, was schief läuft. Außerdem gibt es hier bereits ein Fritzing-Teil für dieses Gerät (gefunden durch eine Google-Suche in der Form “fritzing-teil yx5300 mp3-Player-Modul”):

Danke für Deine Antwort, lieber vanepp,

Bei mir sah das Bauteil in Inkscape aber eigentlich anders aus. Hier ist ein Screenshot des Bauteils bei Inkscape ( größere Beschriftung der Pins). Auf dem anderen Screenshot sieht man dann, dass die Beschriftung des Bauteils kleiner geworden ist. Beim dritten Screenshot sieht man die Fehlermeldung, die erscheint, wenn ich die Inkscape- Datei bei Fritzing hochladen. Woran könnte das liegen?

Danke für den Link des schon vorhandenen Bauteils von YX5300! Trotzdem würde es mich weiterhin interessieren, wo der Fehler liegt füs nächste Mal;).

LG Leon

I suspect what is happening here is you have a px in the font size in your svg. Inkscape always adds px to the font size like this:

because it is required by CSS. Fritzing (especially the parts editor!) doesn’t support the px in the font size and will change the font size (usually to 0 making the text basically disappear) but sometimes to a smaller value which can cause changes like this. In the svg in your part there is no px in the font size (because parts editor has removed it)

check your original svg in Inkscape and see if it says font-size 0.896056px if it does, you need to edit the svg with a text editor and replace all the “px” with “” so the font-size will be font-size 0.896056 (or whatever the correct font size is in the svg!) then things should work better when you load the svg in to parts editor. I typically do this by running the FritzingCheckPart.py script available here:

which among a variety of other checks (it will complain about the lack of a layerId for instance) removes the px from all the font sizes. As noted a text editor will also do what is needed.

Peter

Ich vermute, was hier passiert, ist, dass Sie ein px in der Schriftgröße in Ihrem SVG haben. Inkscape fügt der Schriftgröße immer px wie folgt hinzu:

weil es von CSS benötigt wird. Fritzing (insbesondere der Teileeditor!) unterstützt das px in der Schriftgröße nicht und ändert die Schriftgröße (normalerweise auf 0, wodurch der Text praktisch verschwindet), aber manchmal auf einen kleineren Wert, der zu solchen Änderungen führen kann. In der SVG in deinem Teil gibt es kein px in der Schriftgröße (weil der Teileeditor es entfernt hat)

Überprüfen Sie Ihre Original-Svg in Inkscape und sehen Sie, ob Schriftgröße 0,896056px angezeigt wird. Wenn dies der Fall ist, müssen Sie die SVG-Datei mit einem Texteditor bearbeiten und alle “px” durch “” ersetzen, damit die Schriftgröße Schriftgröße ist 0.896056 (oder was auch immer die korrekte Schriftgröße im SVG ist!), dann sollten die Dinge besser funktionieren, wenn Sie das SVG in den Teileeditor laden. Normalerweise mache ich dies, indem ich das hier verfügbare Skript FritzingCheckPart.py ausführe:

die neben einer Vielzahl anderer Überprüfungen (es wird zum Beispiel das Fehlen einer LayerId beschwert) das px aus allen Schriftgrößen entfernt. Wie bereits erwähnt, wird ein Texteditor auch das tun, was benötigt wird.

I had the same problem today by editing a Fritzing part in Inkscape. I did not know the px problem and converted the problematic text in curves, so it workd for me. But good to know for the next trial!