Repository navigation
Commit 687fd77
committed
fix(zpl): reverse text uses ^GB+^FR knockout pattern instead of ^LR
^LRY/^LRN wraps a single field with label-reverse, which Zebra
firmware (and Labelary) treat as a global bitmap flip rather than
per-field inversion. The result: our reverse-text emit produced no
visible inversion on print, only the canvas faked the effect.
Switch the text emitter to the standard ZPL pattern for white-on-
black: a filled black ^GB at the field anchor (sized to the rendered
ink bbox) followed by ^FR^FD so the printer knocks the glyphs out of
the black.
Parser stashes filled-black ^GB candidates and collapses them with a
following ^FR text at the same anchor with matching bbox back into a
single reverse-text object, so the round-trip stays one-to-one. Hand-
written ZPL with unrelated ^GB+^FR pairs at mismatched anchors or
sizes round-trips unchanged via the existing box path.
Scope limited to text per the open follow-up ticket; box / ellipse /
line still emit ^LR via wrapReverse and remain broken on Labelary
(rarely used; addressed separately).1 parent 8c36535 commit 687fd77
6 files changed
Lines changed: 268 additions & 73 deletions
File tree
- src
- components/Canvas
- lib
- registry
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | | - | |
| 287 | + | |
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
| |||
309 | 315 | | |
310 | 316 | | |
311 | 317 | | |
312 | | - | |
| 318 | + | |
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
58 | 79 | | |
59 | 80 | | |
60 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
139 | 152 | | |
140 | 153 | | |
141 | 154 | | |
| |||
0 commit comments