summaryrefslogtreecommitdiffstats
path: root/src/desktop-style.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-07-25 18:03:01 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-08-02 21:26:28 +0000
commita233a33e9bd81f76a75d17a6355ed59e1679d125 (patch)
treeb7ab4dc90ace09b4a60dfa257f9dd9042dad920f /src/desktop-style.cpp
parentStop worinig with units switch to px. Keep discussion opengit add .git add . (diff)
downloadinkscape-a233a33e9bd81f76a75d17a6355ed59e1679d125.tar.gz
inkscape-a233a33e9bd81f76a75d17a6355ed59e1679d125.zip
Removing absolute units
Diffstat (limited to '')
-rw-r--r--src/desktop-style.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index ee8a96c4e..6c8095d53 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -1066,12 +1066,14 @@ objects_query_fontnumbers (const std::vector<SPItem*> &objects, SPStyle *style_r
// Quick way of getting document scale. Should be same as:
// item->document->getDocumentScale().Affine().descrim()
double doc_scale = Geom::Affine(item->i2dt_affine()).descrim();
+
double dummy = style->font_size.computed * doc_scale;
if (!std::isnan(dummy)) {
size += dummy; /// \todo FIXME: we assume non-% units here
} else {
no_size++;
}
+
if (style->letter_spacing.normal) {
if (!different && (letterspacing_prev == 0 || letterspacing_prev == letterspacing)) {
letterspacing_normal = true;
@@ -1113,7 +1115,8 @@ objects_query_fontnumbers (const std::vector<SPItem*> &objects, SPStyle *style_r
lineheight_normal = false;
lineheight += lineheight_current;
} else {
- lineheight_current = style->line_height.value;
+ // Always 'px' internally
+ lineheight_current = style->line_height.computed;
lineheight_unit_current = style->line_height.unit;
lineheight_unit_absolute = true;
lineheight_normal = false;