diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-04-08 13:47:33 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-04-08 13:47:33 +0000 |
| commit | 1106ff9eeb561af9216563e3eb7422088fac4cf5 (patch) | |
| tree | 8dc88ec1211b985e18c86835196d45e124d8cfe4 /src/style.cpp | |
| parent | update to trunk (diff) | |
| parent | Bug #1552765 fixed Break Apart dont handle well stroke with in documents diff... (diff) | |
| download | inkscape-1106ff9eeb561af9216563e3eb7422088fac4cf5.tar.gz inkscape-1106ff9eeb561af9216563e3eb7422088fac4cf5.zip | |
update to trunk
(bzr r13645.1.125)
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/style.cpp b/src/style.cpp index 99beaed22..c24818f2a 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -113,7 +113,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : font_weight( "font-weight", enum_font_weight, SP_CSS_FONT_WEIGHT_NORMAL, SP_CSS_FONT_WEIGHT_400 ), font_stretch( "font-stretch", enum_font_stretch, SP_CSS_FONT_STRETCH_NORMAL ), font_size(), - line_height( "line-height", 125 ), // SPILengthOrNormal + line_height( "line-height", 1.25 ), // SPILengthOrNormal font_family( "font-family", "sans-serif" ), // SPIString w/default font(), // SPIFont font_specification( "-inkscape-font-specification" ), // SPIString @@ -1510,7 +1510,8 @@ gchar const * sp_style_get_css_unit_string(int unit) { // specify px by default, see inkscape bug 1221626, mozilla bug 234789 - + // This is a problematic fix as some properties (e.g. 'line-height') have + // different behaviour if there is no unit. switch (unit) { case SP_CSS_UNIT_NONE: return "px"; @@ -1899,8 +1900,9 @@ sp_css_attr_scale_property_single(SPCSSAttr *css, gchar const *property, if (w == units) {// nothing converted, non-numeric value return; } - if (only_with_units && (units == NULL || *units == '\0' || *units == '%')) { + if (only_with_units && (units == NULL || *units == '\0' || *units == '%' || *units == 'e')) { // only_with_units, but no units found, so do nothing. + // 'e' matches 'em' or 'ex' return; } Inkscape::CSSOStringStream os; @@ -1957,7 +1959,7 @@ sp_css_attr_scale(SPCSSAttr *css, double ex) sp_css_attr_scale_property_single(css, "kerning", ex); sp_css_attr_scale_property_single(css, "letter-spacing", ex); sp_css_attr_scale_property_single(css, "word-spacing", ex); - //sp_css_attr_scale_property_single(css, "line-height", ex, true); + sp_css_attr_scale_property_single(css, "line-height", ex, true); return css; } |
