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

change dpi-settings of pt,mm #223

Closed
JoKalliauer opened this issue Feb 24, 2020 · 3 comments
Closed

change dpi-settings of pt,mm #223

JoKalliauer opened this issue Feb 24, 2020 · 3 comments

Comments

@JoKalliauer
Copy link
Contributor

rsvg and resvg render different sizes for width="000mm" height="000mm" viewBox="0 0 000 000" If you used rsvg for years and want to change to resvg you maybe do not care about current standards, you just want that the old versions still work.

rsvg resvg
Asterias_r Asterias_re
Digestive system diagram en_r Digestive system diagram en_re
Mature flower diagram_r Mature flower diagram_re
Respiratory system complete cy_r Respiratory system complete cy_re
Respiratory system complete en_r Respiratory system complete en_re

rsvg and resvg render different windows: height="00cm" width="000pt"

rsvg resvg
Euro Construction_r Euro Construction_re
Fortepian - schemat_r Fortepian - schemat_re
Heart numlabels_r Heart numlabels_re
Map at millstaetter see_r Map at millstaetter see_re
Musculi colli stylohyoideus_r Musculi colli stylohyoideus_re
Pianino - mechanizm angielski_r Pianino - mechanizm angielski_re
Pianino - mechanizm wiedeński_r Pianino - mechanizm wiedeński_re
Snle-snle-ng-svg_r Snle-snle-ng-svg_re

Copyright see follow individual links above

currently, all of them are in https://commons.wikimedia.org/wiki/Category:Featured_pictures_on_Wikimedia_Commons_-_vector , mostly they can be used under CC-BY-SA

@RazrFalcon
Copy link
Owner

you used rsvg for years and want to change to resvg you maybe do not care about current standards, you just want that the old versions still work

I will not backport old bugs.

You can play with the --dpi option if you like. rsvg uses (or at least used) 90, afaik, and resvg is using 96.

@JoKalliauer
Copy link
Contributor Author

I will not backport old bugs.

I didn't expect something different. I did neither say you should nor you shouldn't.

You can play with the --dpi option if you like. rsvg uses (or at least used) 90, afaik, and resvg is using 96.

Thanks that solves the issue.

@RazrFalcon
Copy link
Owner

I did neither say you should nor you shouldn't.

Sorry, my English is a bit rough/robotic.

By the way, the SVG spec is a bit vague about the default DPI.

According to the https://www.w3.org/TR/CSS21/syndata.html#length-units

The reference pixel is the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm's length. For a nominal arm's length of 28 inches, the visual angle is therefore about 0.0213 degrees. For reading at arm's length, 1px thus corresponds to about 0.26 mm (1/96 inch).

Also, the latest rsvg version is using 96, but still exposes 90 via C interface for compatibility.

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