fix: hide FNC1 invocations from Code 128 text - #30
Merged
GOODBOY008 merged 2 commits intoAug 12, 2026
Conversation
Streetblock
force-pushed
the
feat/fix-code128-fnc1-display
branch
from
August 12, 2026 09:13
d93b7c1 to
81f629a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Code 128 mode D rendering so FNC1 invocations remain encoded but are hidden from human-readable text.
Changes:
- Separates encoded and displayed mode D data.
- Adds unit and golden regression coverage.
- Records a 0.74% Labelary comparison.
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/barcodes/code128.rs |
Prepares encoded and display values. |
src/drawers/renderer.rs |
Renders the sanitized interpretation line. |
tests/unit_barcodes.rs |
Adds exact transformation assertions. |
tests/e2e_golden.rs |
Registers the golden test. |
testdata/unit/code128_mode_d_fnc1.zpl |
Adds the regression fixture. |
testdata/diffs/diff_report_unit.txt |
Records golden comparison results. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
| #[test] | ||
| fn golden_code128_mode_d_fnc1() { | ||
| golden_zpl_with_tolerance("code128_mode_d_fnc1", 1.0); |
Contributor
Author
|
Good catch. The unit fixture path was overriding the requested 1% limit with the 8% unit default. I addressed the shared tolerance selection separately in #31, including a regression test and correct effective-tolerance reporting. This keeps the infrastructure fix independent from this Code 128 change. |
Owner
|
@Streetblock I had patch a commit to fix text under barcode. |
…on line Labels improved: - code128_mode_d_fnc1: 0.74% → 0.48% Changes: - src/drawers/renderer.rs: mode D (UCC/EAN) interpretation line now uses the embedded Helvetica Bold Condensed at 14.3×module with a 4px vertical offset, matching Labelary's larger condensed line font (~14×module ink height). Other barcode modes keep the standard DejaVu Mono @ 11×module — unchanged. - testdata/diffs/: regenerated comparison/diff images and unit report. Verified: unit report only this entry changed, labels report zero changes, golden 104/104 pass.
GOODBOY008
force-pushed
the
feat/fix-code128-fnc1-display
branch
from
August 12, 2026 11:05
dbc13e5 to
784b150
Compare
GOODBOY008
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #29
What changed
>8invocations as FNC1 codewords in the encoded symbolVerification
cargo fmt --checkcargo testGOOD, below 1%)The remaining visual difference is caused by font metrics/canvas sizing, not by FNC1 encoding or display semantics.