Skip to content

Commit

Permalink
Fix bad 'pt' unit definition
Browse files Browse the repository at this point in the history
'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/FreeCAD@3db7496 (despite bug always existed, even before this commit)
Source : https://oreillymedia.github.io/Using_SVG/guide/units.html
  • Loading branch information
0penBrain authored and wwmayer committed Nov 29, 2019
1 parent 98b6148 commit 0a8c73f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Draft/importSVG.py
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 0a8c73f

Please sign in to comment.