Giter VIP home page Giter VIP logo

Comments (5)

KjellMorgenstern avatar KjellMorgenstern commented on July 17, 2024

The svg uses a resolution of almost 7 million dpi :

width="1.01321in"
height="1.1097in"
viewBox="0 0 6769375 7414023"

At 7 million dpi, a font size of 324770 seems fit.
But that is quite an unusual resolution.
Do you know of any tools that use that, or a large number of Fritzing parts? Also for CorelDraw, I think it needs to be explicitly configured when exporting the svg. The default would be more like 1000dpi or similar.

PS. Recent versions of Fritzing allow using 6 digit precision for gerber exports for the PCB. At least the output format is not the limiting factor. But for schematics, I don't think it will make sense.

from fritzing-app.

KjellMorgenstern avatar KjellMorgenstern commented on July 17, 2024

... it seem to be a QT6 issue probably)

Yes, also I tried it with a different Qt6 program, and it renders the same as in Fritzing. I guess the font size is capped, apparently around ~ 50000 dpi.

from fritzing-app.

vanepp avatar vanepp commented on July 17, 2024

The issue seems a lot weirder than that. I have been experimenting with the svg with the intent of figuring out what a sensible minimum scale would be (with the intent of producing an error message for svgs with a too low scale, with a pointer to instructions to rescale the svg and rebuild the part.) It appears Inkscape is changing the viewbox values when changing from a scale of 0.000001 to 0.000002 then back to 0.000001. It does not produce the same view box that it started out with in the transition. The first svg breaks, the second (with a different viewbox value) works although the scales are both showing as 0.000001. I'll continue experimenting to try and figure out how to detect this so we could issue an error message for broken parts (as I think it unlikely we will be able to get QT to change!)

from fritzing-app.

vanepp avatar vanepp commented on July 17, 2024

OK, I look to have figured out my problem. It looks like Inkscape can't do a scale more than a million to 1. The svg that breaks has a scale of 6.6 million to 1 ( calculated by dividing the viewbox values by the height and width in the metadata.) So one solution, (although I am not sure it is worth the effort it will take), would be to check the scale value in the svgs (perhaps just the schematic svg since it seems to be the one that is breaking but all of them won't hurt) and put up an error message pointing out the scale is too high and may not render in Fritzing with a pointer to the svg rescaling page in the forums here

https://forum.fritzing.org/t/rescale-a-svg-using-inkscape/7581

for a solution with the suggestion that the 1 to 1000 scale called for in the graphics standards is an appropriate value to change it to. I expect this will be a relatively few parts with a scale this high, and thus may not be worth doing unless it is easy, but it would help people figure out why sketches are not rendering correctly when it occurs. If it is too much work, I expect this to be rare enough that we can deal with it by people asking about it in the forums.

from fritzing-app.

KjellMorgenstern avatar KjellMorgenstern commented on July 17, 2024

Created issue #4138 to show a proper error message if this happens.

from fritzing-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.