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

width/height attributes often not removed with --enable-viewboxing due to rounding errors #127

Closed
Ede123 opened this issue Jan 15, 2017 · 1 comment
Labels

Comments

@Ede123
Copy link
Member

Ede123 commented Jan 15, 2017

The function properlySizeDoc is supposed to set a viewBox with the images dimensions and remove width/height attributes.

The problem is that we preserve width/height if a viewBox is already present and the values of both do not match perfectly.

Due to rounding in Scour they will almost never match for non-integer dimensions.

@Ede123 Ede123 added the bug label Jan 15, 2017
@Ede123
Copy link
Member Author

Ede123 commented Jan 15, 2017

Easiest solutions will probably be to apply rounding to the viewBox attribute, too. This will not only prevent rounding errors in Scour from causing problems but will also resolve rounding errors by other applications.

@Ede123 Ede123 closed this as completed Jan 15, 2017
@Ede123 Ede123 reopened this Jan 15, 2017
Ede123 added a commit to Ede123/scour that referenced this issue Feb 19, 2017
This fixes scour-project#127.
Also simplify splitting of viewBox lengths and avoiding a "FutureWarning: split() requires a non-empty pattern match" at the same time
@Ede123 Ede123 closed this as completed in 01cb120 Feb 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant