- Abstand der Buchstaben als Parameter auslesen
This commit is contained in:
+1
-1
@@ -8,7 +8,6 @@
|
|||||||
# width=190mm
|
# width=190mm
|
||||||
height=200
|
height=200
|
||||||
width=400
|
width=400
|
||||||
space=20
|
|
||||||
# 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
|
||||||
@@ -34,6 +33,7 @@ y=20
|
|||||||
length=200
|
length=200
|
||||||
# Fontname und Fonttyp
|
# Fontname und Fonttyp
|
||||||
fontname=ausgangsschrift
|
fontname=ausgangsschrift
|
||||||
|
glyph_space=20
|
||||||
counter_replace=True
|
counter_replace=True
|
||||||
#align=center,left,right
|
#align=center,left,right
|
||||||
align=left
|
align=left
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ y=300
|
|||||||
length=200
|
length=200
|
||||||
# Fontname und Fonttyp
|
# Fontname und Fonttyp
|
||||||
fontname=ausgangsschrift
|
fontname=ausgangsschrift
|
||||||
space=20
|
glyph_space=20
|
||||||
counter_replace=True
|
counter_replace=True
|
||||||
#align=center,left,right
|
#align=center,left,right
|
||||||
align=left
|
align=left
|
||||||
|
|||||||
+2
-1
@@ -75,6 +75,7 @@ class Word:
|
|||||||
word_length = self.calc_length()
|
word_length = self.calc_length()
|
||||||
x = float(params['x'] + word_length - params['length'])
|
x = float(params['x'] + word_length - params['length'])
|
||||||
y = params['y']
|
y = params['y']
|
||||||
|
glyph_space = float(params['glyph_space'])
|
||||||
|
|
||||||
svgstr = ''
|
svgstr = ''
|
||||||
counter = 0
|
counter = 0
|
||||||
@@ -84,7 +85,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 +30
|
x = g.GetLength() + x + glyph_space
|
||||||
# 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']:
|
||||||
|
|||||||
Reference in New Issue
Block a user