diff --git a/cfg/font.cfg b/cfg/font.cfg index 73616db..4492952 100644 --- a/cfg/font.cfg +++ b/cfg/font.cfg @@ -8,7 +8,6 @@ # 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 @@ -34,6 +33,7 @@ y=20 length=200 # Fontname und Fonttyp fontname=ausgangsschrift +glyph_space=20 counter_replace=True #align=center,left,right align=left diff --git a/cfg/punkteraetsel.cfg b/cfg/punkteraetsel.cfg index db8d188..96f608a 100644 --- a/cfg/punkteraetsel.cfg +++ b/cfg/punkteraetsel.cfg @@ -33,7 +33,7 @@ y=300 length=200 # Fontname und Fonttyp fontname=ausgangsschrift -space=20 +glyph_space=20 counter_replace=True #align=center,left,right align=left diff --git a/libs/piccreate.py b/libs/piccreate.py index 0975cef..fb33452 100644 --- a/libs/piccreate.py +++ b/libs/piccreate.py @@ -75,6 +75,7 @@ class Word: word_length = self.calc_length() x = float(params['x'] + word_length - params['length']) y = params['y'] + glyph_space = float(params['glyph_space']) svgstr = '' counter = 0 @@ -84,7 +85,7 @@ class Word: g = self.font.GlyphGet(c) content['posx'] = str(x) # 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 # diese durch den aktuellen Zählerstand ersetzen if params['counter_replace']: