[librsvg] font_size_from_values(): No need to look at the direction; it's always Both
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] font_size_from_values(): No need to look at the direction; it's always Both
- Date: Tue, 22 Jan 2019 01:49:01 +0000 (UTC)
commit 3a9896a9c0dc4ce3dcf0b9d68ecfa302fe278d13
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Jan 21 19:31:13 2019 -0600
font_size_from_values(): No need to look at the direction; it's always Both
rsvg_internals/src/length.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/length.rs b/rsvg_internals/src/length.rs
index 8f71f50a..8db1b79f 100644
--- a/rsvg_internals/src/length.rs
+++ b/rsvg_internals/src/length.rs
@@ -305,7 +305,8 @@ fn font_size_from_values(values: &ComputedValues, params: &ViewParams) -> f64 {
match v.unit {
LengthUnit::Default => v.length,
- LengthUnit::Inch => v.length * v.dir.scaling_factor(params.dpi_x, params.dpi_y),
+ // FontSize always is a LengthDir::Both, per properties.rs
+ LengthUnit::Inch => v.length * LengthDir::Both.scaling_factor(params.dpi_x, params.dpi_y),
LengthUnit::Percent => unreachable!("ComputedValues can't have a relative font size"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]