Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Pin Labels to MicroSD Card module #379

Open
Tombstone2K opened this issue Jul 20, 2023 · 8 comments
Open

Added Pin Labels to MicroSD Card module #379

Tombstone2K opened this issue Jul 20, 2023 · 8 comments

Comments

@Tombstone2K
Copy link
Contributor

I edited the included part for the microSD card module, adding labels for the various pins.
I have attached an image showing the original part and my edited part as well as the fzpz file (inside the attached zip file).

microsd_photo

microsdmodule_label.zip

How do I help merge these changes ?

@KjellMorgenstern
Copy link
Member

KjellMorgenstern commented Jul 22, 2023

To help further, you can create a pull request, where you update the modified SVG file (the breadboard svg in this case).

For this simple change it can be done via the github webfrontend.

@KjellMorgenstern
Copy link
Member

"create a branch" to get started
image

@Tombstone2K
Copy link
Contributor Author

Thanks for your help.

I am not able to find a "create a branch" option.

git_create_a_branch

It seems like I need to be given some permissions before I can create a branch.

Regards

@KjellMorgenstern
Copy link
Member

No need to be in the core team to make a PR. Please check with a github tutorial, it is essential knowledge.

@Tombstone2K
Copy link
Contributor Author

No need to be in the core team to make a PR. Please check with a github tutorial, it is essential knowledge.

I created a Fork, committed the change to that, and opened a pull request in the main repo.
Thanks for your help

@KjellMorgenstern
Copy link
Member

KjellMorgenstern commented Aug 17, 2023

I reviewed the part, and it works :-)

But since we want to improve our parts format (and the workflow to add new parts), forgive me if I am a bit picky.

Which tool did you use to insert the text?
The text tags are quite convoluted:

<text
   xml:space="preserve"
   transform="matrix(0,0.75000031,-0.75000031,0,31.587174,-10.779515)"
   id="text1047"
   style="font-size:5.33333px;white-space:pre;shape-inside:url(#rect1049);fill:#f9f9f9"><tspan
     x="30.642578"
     y="31.739384"
     id="tspan621">CS</tspan></text>

So there is a text element, that has a transform matrix. Ok.
But: It also references to be shape-inside "rect1049". This will offset quite a lot of tools.
Then, the text is inside a tspan, which again has x y coordinates.

Fritzing renders it correct, but more or less by random: Fritzing simply throws away most style attributes, which are not valid TinySVG, so it ignores the "shape-inside" .

Fritzing tries to interpret the font-size, but the font-size is given in px, which is somewhat awkward if you take into account that the text transform matrix has some scaling, and the whole SVG is specified in inches in the header.
I think Fritzing patches this by ignoring the "px", and does not try to use the actual resulting pixel size. From a quick search: The relationship between px and physical units has been defined in CSS 2.1 . Fritzing uses TinySVG, which does not allow any CSS.

From the line formatting, it looks like the FritzingCheckParts script has been applied, is that correct? The script fixes some things, but sometimes makes it quite hard to review changes because of the reformatting.

Because of the header, I assume Adobe Illustrator was used, but typically illustrator does not add a width/height in inches. Did you fix that manually?

The SVG without automatic filters from Fritzing (when passing the file to the rendering library without 'filter')
image

@KjellMorgenstern
Copy link
Member

KjellMorgenstern commented Aug 17, 2023

To have it rendered correct, I had to remove the tspan:

<text
   transform="matrix(0,0.75000031,-0.75000031,0,52.252742,-7.1124403)"
     style="font-size:5.33333px; fill:#f9f9f9"
     x="30.642578"
     y="31.739384">MOSI</text></svg>

tspan (and QtSVG , our renderer) are a known problem:
https://graphicdesign.stackexchange.com/questions/157314/inkscape-save-tiny-svg-for-qtsvg-compliance

The problem is that QtSVG ignores the x,y in the tspan, and only applies the matrix transform. Not a bug, indeed x y offset (and rotation) are not supported: https://www.w3.org/TR/SVGTiny12/text.html#TSpanElement

@Tombstone2K
Copy link
Contributor Author

@KjellMorgenstern
I had used Inkscape to add the text labels to the pins.

I am a bit new to vector graphics.
Thanks for fixing the issue if any.

Is there anything further required on my end ?

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants