Skip to content

Commit

Permalink
Update autoexporter.py
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
burghoff committed Oct 18, 2022
1 parent 947d397 commit 8a71c31
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scientific_inkscape/autoexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ def Scale_Text(self,el):
# Sets all font-sizes to 100 px by moving size into transform
# Office rounds every fonts to the nearest px and then transforms it,
# so this makes text sizes more accurate
from TextParser import LineList, tline
from TextParser import ParsedText, tline
svg = el.croot;
szs = []
for d in el.descendants2: # all Tspan sizes
Expand All @@ -1067,10 +1067,10 @@ def Scale_Text(self,el):
g = dh.group([el],moveTCM=True)

for d in reversed(el.descendants2):
xv = LineList.GetXY(d,'x')
yv = LineList.GetXY(d,'y')
dxv = LineList.GetXY(d,'dx')
dyv = LineList.GetXY(d,'dy')
xv = ParsedText.GetXY(d,'x')
yv = ParsedText.GetXY(d,'y')
dxv = ParsedText.GetXY(d,'dx')
dyv = ParsedText.GetXY(d,'dy')

if xv[0] is not None: d.set('x',tline.writev([v*s for v in xv]))
if yv[0] is not None: d.set('y',tline.writev([v*s for v in yv]))
Expand Down

0 comments on commit 8a71c31

Please sign in to comment.