summaryrefslogtreecommitdiff
path: root/templates/batch_lettering.xml
blob: bfd93eb0e5524fc8c0869a6519f147dc612734b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension translationdomain="inkstitch" xmlns="http://www.inkscape.org/namespace/inkscape/extension">
    <name>Batch Lettering</name>
    <id>org.{{ id_inkstitch }}.output.batch_lettering</id>
    <param name="extension" type="string" gui-hidden="true">batch_lettering</param>

    <param name="notebook" type="notebook">

        <page name="options" gui-text="Options">
          <hbox>
            <vbox>
                <param name="text" type="string" gui-text="Text" appearance="multiline"
                       gui-description="Enter the text. Each line of text will be exported to a separate file." />
                <param name="separator" type="string" gui-text="Custom separator"
                       gui-description="Set a custom separator for multiline text export. Leave empty for line break." />
                <spacer />
                <separator />
                <spacer />
                <param name="font" type="string" gui-text="Font name"></param>
                <param name="scale" type="int" gui-text="Scale (%)" min="1" max="800"
                       gui-description="The scale value must be within the scale range of the specified font.">100</param>
                <param name="color-sort" type="optiongroup" appearance="combo" gui-text="Color sort">
                   <option value="off">Off</option>
                   <option value="all">Whole text</option>
                   <option value="line" >Line</option>
                   <option value="word" >Word</option>
                </param>
                <param name="trim" type="optiongroup" appearance="combo" gui-text="Add trims">
                   <option value="off">Never</option>
                   <option value="line">after each line</option>
                   <option value="word">after each word</option>
                   <option value="glyph">after each letter</option>
                </param>
                <param name="use-command-symbols" type="boolean" gui-text="Use command symbols">false</param>
                <param name="text-align" type="optiongroup" appearance="combo" gui-text="Align Multiline Text">
                   <option value="left">Left</option>
                   <option value="center">Center</option>
                   <option value="right">Right</option>
                   <option value="block">Block (default)</option>
                   <option value="letterspacing">Block (letterspacing)</option>
                </param>

                <hbox>
                    <param name="letter_spacing" type="float" precision="2" min="-500" max="500"
                           gui-text="Letter spacing">0</param>
                    <param name="word_spacing" type="float" precision="2" min="-500" max="500"
                           gui-text="Word spacing">0</param>
                    <param name="line_height" type="float" precision="2" min="-500" max="500"
                           gui-text="Line height">0</param>
                </hbox>

              </vbox>
              <spacer />
              <separator />
              <spacer />
              <vbox>
                <param name="text-position" type="optiongroup" appearance="combo" gui-text="Lettering along path: text position"
                       gui-description="Uses this text position when using lettering along path">
                   <option value="left">Left</option>
                   <option value="center">Center</option>
                   <option value="right">Right</option>
                   <option value="stretch">Stretch</option>
                </param>
                <spacer />
                <separator />
                <spacer />
                <param name="file-formats" type="string" gui-text="File formats" gui-description="Comma separated list of file formats" />
              </vbox>
            </hbox>
        </page>

        <page name="info" gui-text="Help">
            <label>Use this extension to save multiple files with the given text.</label>
            <spacer />
            <label>When the document contains a path element labeled as "batch lettering" it will be used to place the text along this path. The path itself will be removed and won't be rendered.</label>
            <spacer />
            <label>More information on our website</label>
            <label appearance="url">https://inkstitch.org/docs/lettering/#batch-export</label>
        </page>
    </param>

    <output>
        <extension>.zip</extension>
        <mimetype>application/zip</mimetype>
        <filetypename>{{ menu_inkstitch }}: batch lettering (.zip)</filetypename>
        <filetypetooltip>Create a zip with multiple files including embroidered text using Ink/Stitch</filetypetooltip>
        <dataloss>true</dataloss>
    </output>

    <script>
        {{ command_tag | safe }}
    </script>
</inkscape-extension>