diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2011-08-21 23:19:15 +0000 |
|---|---|---|
| committer | Felipe C. da S. Sanches <juca@members.fsf.org> | 2011-08-21 23:19:15 +0000 |
| commit | 5ad38fa7faa3bd38525cf39d2568590c1fcdb475 (patch) | |
| tree | 269a70862340f591dc78c1c0ec42d06918477bb8 | |
| parent | removing references to PathData.py from Makefile.am and inx files. The inx fi... (diff) | |
| download | inkscape-5ad38fa7faa3bd38525cf39d2568590c1fcdb475.tar.gz inkscape-5ad38fa7faa3bd38525cf39d2568590c1fcdb475.zip | |
add boolead option to load only the first 30 glyphs from an SVGFont (otherwise the loading process may take a long time)
This performance issue should be actually addressed somehow to make the extension work better.
(bzr r10567)
| -rw-r--r-- | share/extensions/svgfont2layers.inx | 1 | ||||
| -rw-r--r-- | share/extensions/svgfont2layers.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/share/extensions/svgfont2layers.inx b/share/extensions/svgfont2layers.inx index 02708ae0e..5d66af341 100644 --- a/share/extensions/svgfont2layers.inx +++ b/share/extensions/svgfont2layers.inx @@ -5,6 +5,7 @@ <dependency type="executable" location="extensions">inkex.py</dependency> <dependency type="executable" location="extensions">simplepath.py</dependency> <dependency type="executable" location="extensions">svgfont2layers.py</dependency> + <param name="limitglyphs" type="boolean" _gui-text="Load only the first 30 glyphs (Recommended)"></param> <effect> <object-type>all</object-type> <effects-menu> diff --git a/share/extensions/svgfont2layers.py b/share/extensions/svgfont2layers.py index 43dc510c7..7d8c888e4 100644 --- a/share/extensions/svgfont2layers.py +++ b/share/extensions/svgfont2layers.py @@ -24,6 +24,10 @@ class SVGFont2Layers(inkex.Effect): def __init__(self): self.count=0 inkex.Effect.__init__(self) + self.OptionParser.add_option("--limitglyphs", + action="store", type="inkbool", + dest="limitglyphs", default=True, + help="Load only the first 30 glyphs from the SVGFont (otherwise the loading process may take a very long time)") def create_horiz_guideline(self, label, y): namedview = self.svg.find(inkex.addNS('namedview', 'sodipodi')) @@ -122,7 +126,7 @@ class SVGFont2Layers(inkex.Effect): path.set("d", d) self.count+=1 - if self.count>30: + if self.options.limitglyphs and self.count>=30: break if __name__ == '__main__': |
