diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2021-12-04 11:06:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-04 11:06:10 +0100 |
| commit | df288e57b600efff37e952c373983e2ae7222245 (patch) | |
| tree | 9dda64317e113c527392553d0de850ecef34d212 /lib | |
| parent | 7f7f1781c55d7a304bb44c75a7a16fcdaf61e8c2 (diff) | |
update lettering stroke-width settings (#1466)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lettering/font.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/lettering/font.py b/lib/lettering/font.py index cd94e3a7..09b772c3 100644 --- a/lib/lettering/font.py +++ b/lib/lettering/font.py @@ -208,20 +208,15 @@ class Font(object): # make sure font stroke styles have always a similar look for element in destination_group.iterdescendants(SVG_PATH_TAG): - dash_array = "" - stroke_width = "" - style = inkex.styles.Style(element.get('style')) - + style = inkex.Style(element.get('style')) if style.get('fill') == 'none': - stroke_width = ";stroke-width:1px" - if style.get('stroke-width'): - style.pop('stroke-width') - + style += inkex.Style("stroke-width:1px") if style.get('stroke-dasharray') and style.get('stroke-dasharray') != 'none': - stroke_width = ";stroke-width:0.5px" - dash_array = ";stroke-dasharray:3, 1" - - element.set('style', '%s%s%s' % (style.to_str(), stroke_width, dash_array)) + style += inkex.Style("stroke-dasharray:3, 1") + # Set a smaller width to auto-route running stitches + if self.auto_satin or element.get_id().startswith("autosatinrun"): + style += inkex.Style("stroke-width:0.5px") + element.set('style', '%s' % style.to_str()) self._ensure_command_symbols(destination_group) |
