Repository navigation
Commit 6524f03
committed
fix(zpl): UPC-A and UPC-E render the mandatory check digit
Pre-existing bug surfaced during the rotation refactor review:
- `^BU` (UPC-A) was emitted with the 5th parameter (printCheckDigit)
hardcoded to `N`. Zebra's own default is `Y`; with `N` the printer
omits the check digit from the HRI line. Industry retail UPC-A
always shows it floated right of the bars, mirror of the system
digit on the left.
- `^B9` (UPC-E) likewise hardcoded the 4th parameter to `N`. Same
fix: switch to `Y` to match Zebra/Labelary default and the print
convention. The canvas overlay already had `trail()` wired for
UPC-E, so the visual side needed no change for it.
- UPC-A canvas overlay (`eanUpcDigitNodes.tsx`) now renders the
trailing check digit (slice[11]) symmetric to UPC-E's trail node,
with `clipRight` extended so the floated digit stays visible past
the bar bbox. Stale comment claiming Labelary suppresses the
digit was wrong — Labelary suppressed it only because we asked it
to via the hardcoded `N`.
Labelary fixtures regenerated with the new ZPL; sync test fixtures
updated accordingly.
No new prop introduced — UPC-A/E HRI is a fixed retail format, the
check digit isn't an opt-in display setting.1 parent d3c38d0 commit 6524f03
7 files changed
Lines changed: 20 additions & 7 deletions
File tree
- src
- components/Canvas
- registry
- tests/fixtures
- labelary_images
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | | - | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
0 commit comments