fix silkscreen text knockout rendering#102
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
59109a2 to
6c1e180
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c1e1805b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (enhancedSvg.includes(`class="${silkscreenClass}"`)) { | ||
| continue |
There was a problem hiding this comment.
Handle silkscreen injection independently per requested side
The guard enhancedSvg.includes(class="${silkscreenClass}") is global, so when both F_SilkScreen and B_SilkScreen are requested and neither is already rendered in the board body, the first injected side adds the shared ..._ss class and causes the second side to be skipped. This makes combined top+bottom silkscreen snapshots incomplete even though both layers were requested; the check should be tied to the specific side/group rather than any occurrence of the class.
Useful? React with 👍 / 👎.
Summary
toUpperCase().pcb-stackupdefines the layer group but does not include it in the rendered board body.Root Cause
Silkscreen text used the shared vector text path, but knockout polarity was only enabled for copper text. Separately, the Gerber text loop uppercased every character before looking up glyph paths, which made lowercase source text render as uppercase in Gerber snapshots.
Validation
bun test tests/gerber/generate-gerber-with-silkscreen-knockout-repro.test.ts