From 82931b4368c984269cf8c64efdde8113a255a472 Mon Sep 17 00:00:00 2001 From: 0penBrain <48731257+0penBrain@users.noreply.github.com> Date: Sun, 24 Nov 2019 15:03:07 +0100 Subject: [PATCH] Fix bad 'pt' unit definition 'pt' unit has been defined as 1.25 px while it is 4/3 px (~1.33 px). Relates to issue #4200 Relates to Syres916@469e01d (despite bug always existed, even before this commit) Source : https://oreillymedia.github.io/Using_SVG/guide/units.html --- src/Mod/Draft/importSVG.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index 347209c98c..fb19737a30 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -356,7 +356,7 @@ def getsize(length, mode='discard', base=1): tomm = { '': 25.4/90, # default 'px': 25.4/90, - 'pt': 1.25 * 25.4/90, + 'pt': 4/3 * 25.4/90, 'pc': 15 * 25.4/90, 'mm': 1.0, 'cm': 10.0, @@ -369,7 +369,7 @@ def getsize(length, mode='discard', base=1): tomm = { '': 25.4/96, # default 'px': 25.4/96, - 'pt': 1.25 * 25.4/96, + 'pt': 4/3 * 25.4/96, 'pc': 15 * 25.4/96, 'mm': 1.0, 'cm': 10.0, @@ -382,7 +382,7 @@ def getsize(length, mode='discard', base=1): topx = { '': 1.0, # default 'px': 1.0, - 'pt': 1.25, + 'pt': 4/3, 'pc': 15, 'mm': 90.0/25.4, 'cm': 90.0/254.0, @@ -395,7 +395,7 @@ def getsize(length, mode='discard', base=1): topx = { '': 1.0, # default 'px': 1.0, - 'pt': 1.25, + 'pt': 4/3, 'pc': 15, 'mm': 96.0/25.4, 'cm': 96.0/254.0,