Code

Make units pc (pica) and ft (feet) work correctly. Closes: LP #167943.
[inkscape.git] / src / svg / svg-length.cpp
index f0b7f85f6dd52754aee5b1c34baf2c7a41f433a5..f909446675911d791382a4ca06d3150230760983 100644 (file)
@@ -350,7 +350,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit,
                     *unit = SVGLength::PC;
                 }
                 if (computed) {
-                    *computed = v * 12 * PX_PER_PT;
+                    *computed = v * PX_PER_PC;
                 }
                 break;
             case UVAL('m','m'):
@@ -377,6 +377,14 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit,
                     *computed = v * PX_PER_IN;
                 }
                 break;
+            case UVAL('f','t'):
+                if (unit) {
+                    *unit = SVGLength::FOOT;
+                }
+                if (computed) {
+                    *computed = v * PX_PER_FT;
+                }
+                break;
             case UVAL('e','m'):
                 if (unit) {
                     *unit = SVGLength::EM;