- eigen Font-config und Eingabedatei gemacht

This commit is contained in:
Eva Möller
2012-07-31 12:26:30 +02:00
parent 89a06f2fdb
commit a98c28107f
6 changed files with 236 additions and 141 deletions
+45
View File
@@ -0,0 +1,45 @@
# wie gross soll das Bild werden
[globals]
# angabe der Länge und Breite in pixelanzahl oder bei 72dpi
# -> 2,83466799 pixel entsprechen 1 mm bei 72 dpi
# -> 11,811116625 pixel entsprechen 1 mm bei 300 dpi
# Ziel für die Grösse:
# height=70mm
# width=190mm
height=200
width=400
space=20
# 0,352775 * pixellänge[bei 72dpi] = länge[mm]
# -> 2,83466799 pixel entsprechen 10 mm
# -> 1000 pixel mit 72dpi entsprechen 352,78 mm
# (wenn man diesselbe Länge bei 300dpi erreichen will, braucht man 4166pixel,
# das 4,16 fache )
# was soll wohin geschrieben werden (,..,..)
lines=PunkteName
# Die Überschriften der csv-Eingabedatei werden so nach intern übersetzt:
[translation]
customerid=Kennummer
name = Name
# das ist die TextZeile die auf das Bild kommt
[PunkteName]
# hier der Inhalt aus der Eingabedatei, der geschrieben werden soll
content=${name}
# Ab dem Punkt wird zu schreiben begonnen
x=0
y=20
length=200
# Fontname und Fonttyp
fontname=ausgangsschrift
counter_replace=True
#align=center,left,right
align=left
[jpgs]
width=1200
height=1200
format=jpg
+4 -3
View File
@@ -6,8 +6,8 @@
# Ziel für die Grösse: # Ziel für die Grösse:
# height=70mm # height=70mm
# width=190mm # width=190mm
height=826.77 height=700
width=2244.112 width=1900
# 0,352775 * pixellänge[bei 72dpi] = länge[mm] # 0,352775 * pixellänge[bei 72dpi] = länge[mm]
# -> 2,83466799 pixel entsprechen 10 mm # -> 2,83466799 pixel entsprechen 10 mm
# -> 1000 pixel mit 72dpi entsprechen 352,78 mm # -> 1000 pixel mit 72dpi entsprechen 352,78 mm
@@ -29,10 +29,11 @@ name = Name
content=${name} content=${name}
# Ab dem Punkt wird zu schreiben begonnen # Ab dem Punkt wird zu schreiben begonnen
x=0 x=0
y=20 y=300
length=200 length=200
# Fontname und Fonttyp # Fontname und Fonttyp
fontname=ausgangsschrift fontname=ausgangsschrift
space=20
counter_replace=True counter_replace=True
#align=center,left,right #align=center,left,right
align=left align=left
Executable → Regular
+180 -135
View File
@@ -24,9 +24,9 @@
borderopacity="1.0" borderopacity="1.0"
inkscape:pageopacity="0.0" inkscape:pageopacity="0.0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:zoom="5.6" inkscape:zoom="7.9195959"
inkscape:cx="65.056233" inkscape:cx="65.056233"
inkscape:cy="943.42323" inkscape:cy="948.04071"
inkscape:document-units="px" inkscape:document-units="px"
inkscape:current-layer="layer1" inkscape:current-layer="layer1"
showgrid="false" showgrid="false"
@@ -70,7 +70,7 @@
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:type <dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title /> <dc:title></dc:title>
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>
@@ -81,149 +81,146 @@
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="60.527813" x="63.384956"
y="100.06429" y="82.02858"
id="text3015-0-9" id="text3015-0-9"
sodipodi:linespacing="125%" sodipodi:linespacing="125%"
inkscape:transform-center-y="-35"><tspan inkscape:transform-center-y="-35"><tspan
sodipodi:role="line" sodipodi:role="line"
id="tspan3017-9-0" id="tspan3017-9-0"
x="60.527813" x="63.384956"
y="100.06429" y="82.02858"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x7</tspan></text> style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x7</tspan></text>
<g <text
id="g3018"> xml:space="preserve"
<text style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
inkscape:transform-center-y="-35" x="37.793247"
sodipodi:linespacing="125%" y="119.00378"
id="text3015" id="text3015"
y="119.00378" sodipodi:linespacing="125%"
inkscape:transform-center-y="-35"><tspan
sodipodi:role="line"
id="tspan3017"
x="37.793247" x="37.793247"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="119.00378"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x5</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="119.00378" xml:space="preserve"
x="37.793247" style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017" x="40.912228"
sodipodi:role="line">x5</tspan></text> y="135.10689"
<text id="text3015-47"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-47" sodipodi:role="line"
y="135.10689" id="tspan3017-2"
x="40.912228" x="40.912228"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="135.10689"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x4</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="135.10689" xml:space="preserve"
x="40.912228" style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-2" x="50.013733"
sodipodi:role="line">x4</tspan></text> y="82.1017"
<text id="text3015-0"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-0" sodipodi:role="line"
y="87.458839" id="tspan3017-9"
x="58.049446" x="50.013733"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="82.1017"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x1</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="87.458839" xml:space="preserve"
x="53.293491" style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-9" x="45.571537"
sodipodi:role="line">x1</tspan></text> y="95.718819"
<text id="text3015-48"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-48" sodipodi:role="line"
y="95.718819" id="tspan3017-5"
x="45.571537" x="45.571537"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="95.718819"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x6</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="95.718819" xml:space="preserve"
x="45.571537" style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-5" x="86.71936"
sodipodi:role="line">x6</tspan></text> y="132.11322"
<text id="text3015-3"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-3" sodipodi:role="line"
y="132.11322" id="tspan3017-10"
x="86.71936" x="86.71936"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="132.11322"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x11</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="132.11322" xml:space="preserve"
x="86.71936" style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-10" x="70.697723"
sodipodi:role="line">x11</tspan></text> y="94.033546"
<text id="text3015-0-6"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-0-6" sodipodi:role="line"
y="96.44426" id="tspan3017-9-3"
x="70.20665" x="70.697723"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="94.033546"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x2</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="96.44426" xml:space="preserve"
x="70.20665" style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-9-3" x="63.370907"
sodipodi:role="line">x2</tspan></text> y="112.04263"
<text id="text3015-47-3"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-47-3" sodipodi:role="line"
y="120.25014" id="tspan3017-2-2"
x="63.623444" x="63.370907"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="112.04263"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x3</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="120.25014" xml:space="preserve"
x="63.623444" style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-2-2" x="69.013687"
sodipodi:role="line">x3</tspan></text> y="141.04482"
<text id="text3015-47-7"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-47-7" sodipodi:role="line"
y="141.04482" id="tspan3017-2-4"
x="69.013687" x="69.013687"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="141.04482"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x10</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" <text
y="141.04482" xml:space="preserve"
x="69.013687" style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-2-4" x="51.226109"
sodipodi:role="line">x10</tspan></text> y="123.90285"
<text id="text3015-7"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-7" sodipodi:role="line"
y="120.74612" id="tspan3017-93"
x="69.282585" x="51.226109"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="123.90285"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x9</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;text-anchor:start;text-align:start" <text
y="120.74612" xml:space="preserve"
x="80.24649" style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="tspan3017-93" x="73.631706"
sodipodi:role="line">x9</tspan></text> y="109.43014"
<text id="text3015-0-98"
inkscape:transform-center-y="-35" sodipodi:linespacing="125%"
sodipodi:linespacing="125%" inkscape:transform-center-y="-35"><tspan
id="text3015-0-98" sodipodi:role="line"
y="106.48371" id="tspan3017-9-7"
x="72.470993" x="73.631706"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" y="109.43014"
xml:space="preserve"><tspan style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">x8</tspan></text>
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
y="106.48371"
x="72.470993"
id="tspan3017-9-7"
sodipodi:role="line">x8</tspan></text>
</g>
<circle <circle
transform="translate(82.909293,126.34101)" transform="translate(82.909293,126.34101)"
sodipodi:ry="2.8138001" sodipodi:ry="2.8138001"
@@ -304,5 +301,53 @@
cy="0" cy="0"
r="2.8138001" r="2.8138001"
id="circle4-7-4" /> id="circle4-7-4" />
<line
x1="58.920017"
y1="88.037155"
x2="62.852188"
y2="82.546013"
style="stroke:#000000;stroke-width:0.13342249;stroke-miterlimit:0;stroke-dasharray:0.13342249, 0.26684497;stroke-dashoffset:0.106738"
id="line4"
inkscape:transform-center-x="-0.97561205" />
<line
x1="55.289429"
y1="88.692154"
x2="50.603432"
y2="82.683998"
style="stroke:#000000;stroke-width:0.15235361;stroke-miterlimit:0;stroke-dasharray:0.1523536, 0.3047072;stroke-dashoffset:0.12188288"
id="line4-3"
inkscape:transform-center-x="1.1626427" />
<line
x1="72.781303"
y1="98.17215"
x2="76.057976"
y2="94.346092"
style="stroke:#000000;stroke-width:0.10166549;stroke-miterlimit:0;stroke-dasharray:0.10166548, 0.20333097;stroke-dashoffset:0.08133238"
id="line4-3-0"
inkscape:transform-center-x="-0.81297255" />
<line
x1="79.138931"
y1="103.90534"
x2="73.227142"
y2="100.68508"
style="stroke:#000000;stroke-width:0.12528136;stroke-miterlimit:0;stroke-dasharray:0.12528135, 0.25056272;stroke-dashoffset:0.10022508"
id="line4-3-5"
inkscape:transform-center-x="1.4667748" />
<line
x1="65.380058"
y1="113.55084"
x2="62.909313"
y2="108.75424"
style="stroke:#000000;stroke-width:0.0988466;stroke-miterlimit:0;stroke-dasharray:0.0988466, 0.19769319;stroke-dashoffset:0.07907728"
id="line4-3-2"
inkscape:transform-center-x="0.6130171" />
<line
x1="61.190258"
y1="123.14194"
x2="65.836433"
y2="119.87129"
style="stroke:#000000;stroke-width:0.11192988;stroke-miterlimit:0;stroke-dasharray:0.11192986, 0.22385973;stroke-dashoffset:0.08954389"
id="line4-3-1"
inkscape:transform-center-x="-1.152764" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

-2
View File
@@ -51,5 +51,3 @@ W;W
X;X X;X
Y;Y Y;Y
Z;Z Z;Z
a-z;abcdefghijklmnopqrstuvwxyz
A-Z;ABCDEFGHIJKLMNOPQRSTUVWXYZ
1 Kennummer Name
51 X X
52 Y Y
53 Z Z
a-z abcdefghijklmnopqrstuvwxyz
A-Z ABCDEFGHIJKLMNOPQRSTUVWXYZ
+6
View File
@@ -0,0 +1,6 @@
Kennummer;Name
a-z;abcdefghijklmnopqrstuvwxyz
A-Z;ABCDEFGHIJKLMNOPQRSTUVWXYZ
001;Michael
yxelbüxel;Eva
063453;Kamil
1 Kennummer Name
2 a-z abcdefghijklmnopqrstuvwxyz
3 A-Z ABCDEFGHIJKLMNOPQRSTUVWXYZ
4 001 Michael
5 yxelbüxel Eva
6 063453 Kamil
+1 -1
View File
@@ -84,7 +84,7 @@ class Word:
g = self.font.GlyphGet(c) g = self.font.GlyphGet(c)
content['posx'] = str(x) content['posx'] = str(x)
# die Position ist erst für den nächsten Buchstaben relevant # die Position ist erst für den nächsten Buchstaben relevant
x = g.GetLength() + x +50 x = g.GetLength() + x +30
# wenn im Buchstaben Platzhalter (x1, x2, x3,...) drin sind, dann # wenn im Buchstaben Platzhalter (x1, x2, x3,...) drin sind, dann
# diese durch den aktuellen Zählerstand ersetzen # diese durch den aktuellen Zählerstand ersetzen
if params['counter_replace']: if params['counter_replace']: