[librsvg] (#646) - Change the default DPI of rsvg-convert to 96
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] (#646) - Change the default DPI of rsvg-convert to 96
- Date: Wed, 3 Feb 2021 18:23:04 +0000 (UTC)
commit ff6f5253aad0a9a80b7df2ebffa1edfca3f54e01
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Feb 3 11:18:44 2021 -0600
(#646) - Change the default DPI of rsvg-convert to 96
See https://gitlab.gnome.org/GNOME/librsvg/-/issues/646 for the
rationale. Basically, this is to be consistent with Inkscape and the
CSS standard.
I am open to reverting this change during the 2.51 development series
if it breaks too many scripts.
src/bin/rsvg-convert.rs | 4 ++--
tests/src/cmdline/rsvg_convert.rs | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/bin/rsvg-convert.rs b/src/bin/rsvg-convert.rs
index 38095622..25834b87 100644
--- a/src/bin/rsvg-convert.rs
+++ b/src/bin/rsvg-convert.rs
@@ -540,7 +540,7 @@ fn parse_args() -> Result<Converter, Error> {
.long("dpi-x")
.takes_value(true)
.value_name("float")
- .default_value("90")
+ .default_value("96")
.validator(is_valid_resolution)
.help("Pixels per inch"),
)
@@ -550,7 +550,7 @@ fn parse_args() -> Result<Converter, Error> {
.long("dpi-y")
.takes_value(true)
.value_name("float")
- .default_value("90")
+ .default_value("96")
.validator(is_valid_resolution)
.help("Pixels per inch"),
)
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index 5a7910c8..900c5141 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -456,11 +456,11 @@ fn huge_zoom_factor_yields_error() {
}
#[test]
-fn default_resolution_is_90dpi() {
+fn default_resolution_is_96dpi() {
RsvgConvert::new_with_input("tests/fixtures/api/dpi.svg")
.assert()
.success()
- .stdout(file::is_png().with_size(90, 360));
+ .stdout(file::is_png().with_size(96, 384));
}
#[test]
@@ -469,7 +469,7 @@ fn x_resolution() {
.arg("--dpi-x=300")
.assert()
.success()
- .stdout(file::is_png().with_size(300, 360));
+ .stdout(file::is_png().with_size(300, 384));
}
#[test]
@@ -479,7 +479,7 @@ fn x_resolution_short_option() {
.arg("45")
.assert()
.success()
- .stdout(file::is_png().with_size(45, 360));
+ .stdout(file::is_png().with_size(45, 384));
}
#[test]
@@ -488,7 +488,7 @@ fn y_resolution() {
.arg("--dpi-y=300")
.assert()
.success()
- .stdout(file::is_png().with_size(90, 1200));
+ .stdout(file::is_png().with_size(96, 1200));
}
#[test]
@@ -498,7 +498,7 @@ fn y_resolution_short_option() {
.arg("45")
.assert()
.success()
- .stdout(file::is_png().with_size(90, 180));
+ .stdout(file::is_png().with_size(96, 180));
}
#[test]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]