Horizontal Text alignment
With the horizontal text alignment, it is possible to achieve an automatic horizontal alignment of text lines.
`"HorizontalAlignment"`
- 0 → align left
- 1 → align center
- 2 → align right

The reference line is the green line in the middle, as it is the longest of the three lines.
The red line has is center aligned and the yellow text is right aligned.
{
"RequestType": "CreatePNG",
"Monograms": [
{
"Text": [
"ZSK Text"
],
"FontFamily": "Arial",
"FontSizeMM": 10.0,
"UsedNeedle": 1,
"XposMM": 0.0,
"YposMM": 0.0,
"HorizontalAlignment": 1,
"TextBendProcent": 0.0,
"TextStitchParameter": "Premium",
"MonogramStyle": 0
},
{
"Text": [
"ZSK Text ZSK Text"
],
"FontFamily": "Arial",
"FontSizeMM": 10.0,
"UsedNeedle": 2,
"XposMM": 0.0,
"YposMM": 20.0,
"HorizontalAlignment": 0,
"TextBendProcent": 0.0,
"TextStitchParameter": "Premium",
"MonogramStyle": 0
},
{
"Text": [
"ZSK Text"
],
"FontFamily": "Arial",
"FontSizeMM": 10.0,
"UsedNeedle": 6,
"XposMM": 0.0,
"YposMM": 40.0,
"HorizontalAlignment": 2,
"TextBendProcent": 0.0,
"TextStitchParameter": "Premium",
"MonogramStyle": 0
}
],
"Needle": [
{
"Red": 255,
"Green": 0,
"Blue": 0,
"Name": "Red"
},
{
"Red": 0,
"Green": 255,
"Blue": 0,
"Name": "Green"
},
{
"Red": 0,
"Green": 0,
"Blue": 255,
"Name": "Blue"
},
{
"Red": 0,
"Green": 255,
"Blue": 255,
"Name": "Cyan"
},
{
"Red": 255,
"Green": 0,
"Blue": 255,
"Name": "Magenta"
},
{
"Red": 255,
"Green": 255,
"Blue": 0,
"Name": "Yellow"
}
],
"PngResolution": 508
}
Note:
- The text alignment function requires at least two lines of text.
- The
"XposMM"
and"YposMM"
values of the monogram objects are not used (except for the first text line, which defines the position of the text block).