Skip to content

Commit f18d0b2

Browse files
committed
Fix composites to pull back text alignment options from their linear symbol
1 parent de92e06 commit f18d0b2

13 files changed

+49
-0
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
XXXX-XX-XX
22

33
* The matrix renderer now supports a rowmult option for vertical run-length encoding of repeated rows, reducing memory allocation and processing for stacked-linear and composite symbols.
4+
* Text alignment options for composite symbols was fixed.
45

56

67
2026-04-03

src/databarexpandedcomposite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ begin
174174
aload pop 4 -1 roll pixx linpixs length sub 1 add add 4 1 roll 5 array astore
175175
} forall } { pop pop } ifelse
176176
] def
177+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
178+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
177179

178180
/pixy ccrows 1 add linheight add def
179181

@@ -203,6 +205,8 @@ begin
203205
/bordertop bordertop
204206
/borderbottom borderbottom
205207
/txt txt
208+
/text1xalign text1xalign
209+
/text1yalign text1yalign
206210
/physspec physspec
207211
/xdim xdim
208212
/xmin xmin

src/databarexpandedstackedcomposite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ begin
169169
aload pop 5 array astore % No x offset needed; linear at column 0
170170
} forall } { pop pop } ifelse
171171
] def
172+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
173+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
172174

173175
/pixy 0 rowmult {add} forall def
174176

@@ -199,6 +201,8 @@ begin
199201
/bordertop bordertop
200202
/borderbottom borderbottom
201203
/txt txt
204+
/text1xalign text1xalign
205+
/text1yalign text1yalign
202206
/physspec physspec
203207
/xdim xdim
204208
/xmin xmin

src/databarlimitedcomposite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ begin
167167
aload pop 4 -1 roll pixx linpixs length sub 1 add add 4 1 roll 5 array astore
168168
} forall } { pop pop } ifelse
169169
] def
170+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
171+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
170172

171173
/pixy ccrows 1 add linheight add def
172174

@@ -196,6 +198,8 @@ begin
196198
/bordertop bordertop
197199
/borderbottom borderbottom
198200
/txt txt
201+
/text1xalign text1xalign
202+
/text1yalign text1yalign
199203
/physspec physspec
200204
/xdim xdim
201205
/xmin xmin

src/databaromnicomposite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ begin
178178
aload pop 4 -1 roll pixx linpixs length sub 1 add add 4 1 roll 5 array astore
179179
} forall } { pop pop } ifelse
180180
] def
181+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
182+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
181183

182184
/pixy ccrows 1 add linheight add def
183185

@@ -207,6 +209,8 @@ begin
207209
/bordertop bordertop
208210
/borderbottom borderbottom
209211
/txt txt
212+
/text1xalign text1xalign
213+
/text1yalign text1yalign
210214
/physspec physspec
211215
/xdim xdim
212216
/xmin xmin

src/databarstackedcomposite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ begin
176176
aload pop 5 array astore % No x offset needed; linear at column 0
177177
} forall } { pop pop } ifelse
178178
] def
179+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
180+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
179181

180182
/pixy 0 rowmult {add} forall def
181183

@@ -206,6 +208,8 @@ begin
206208
/bordertop bordertop
207209
/borderbottom borderbottom
208210
/txt txt
211+
/text1xalign text1xalign
212+
/text1yalign text1yalign
209213
/physspec physspec
210214
/xdim xdim
211215
/xmin xmin

src/databarstackedomnicomposite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ begin
176176
aload pop 5 array astore % No x offset needed; linear at column 0
177177
} forall } { pop pop } ifelse
178178
] def
179+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
180+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
179181

180182
/pixy 0 rowmult {add} forall def
181183

@@ -206,6 +208,8 @@ begin
206208
/bordertop bordertop
207209
/borderbottom borderbottom
208210
/txt txt
211+
/text1xalign text1xalign
212+
/text1yalign text1yalign
209213
/physspec physspec
210214
/xdim xdim
211215
/xmin xmin

src/databartruncatedcomposite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ begin
179179
aload pop 4 -1 roll pixx linpixs length sub 1 add add 4 1 roll 5 array astore
180180
} forall } { pop pop } ifelse
181181
] def
182+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
183+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
182184

183185
/pixy ccrows 1 add linheight add def
184186

@@ -208,6 +210,8 @@ begin
208210
/bordertop bordertop
209211
/borderbottom borderbottom
210212
/txt txt
213+
/text1xalign text1xalign
214+
/text1yalign text1yalign
211215
/physspec physspec
212216
/xdim xdim
213217
/xmin xmin

src/ean13composite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ begin
123123
aload pop 4 -1 roll linpad length 1 add add 4 1 roll 5 array astore
124124
} forall } { pop pop } ifelse
125125
] def
126+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
127+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
126128

127129
/diff linwidth linpad length add 1 add ccpixx sub def % An add-on can make linear wider than composite
128130
diff 0 gt { % Left align composite
@@ -202,6 +204,8 @@ begin
202204
/guardwidth guardwidth
203205
/guardheight guardheight
204206
/txt txt
207+
/text1xalign text1xalign
208+
/text1yalign text1yalign
205209
/physspec physspec
206210
/xdim xdim
207211
/xmin xmin

src/ean8composite.ps.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ begin
133133
aload pop 4 -1 roll linpad length 1 add add 4 1 roll 5 array astore
134134
} forall } { pop pop } ifelse
135135
] def
136+
/text1xalign linsym /text1xalign 2 copy known { get } { pop pop (unset) } ifelse def
137+
/text1yalign linsym /text1yalign 2 copy known { get } { pop pop (unset) } ifelse def
136138

137139
/diff linwidth linpad length add 1 add ccpixx sub def % An add-on can make linear wider than composite
138140
diff 0 gt { % Left align composite
@@ -212,6 +214,8 @@ begin
212214
/guardwidth guardwidth
213215
/guardheight guardheight
214216
/txt txt
217+
/text1xalign text1xalign
218+
/text1yalign text1yalign
215219
/physspec physspec
216220
/xdim xdim
217221
/xmin xmin

0 commit comments

Comments
 (0)