Skip to content

fix silkscreen text knockout rendering#102

Open
techmannih wants to merge 1 commit into
mainfrom
codex/silkscreen-knockout-text
Open

fix silkscreen text knockout rendering#102
techmannih wants to merge 1 commit into
mainfrom
codex/silkscreen-knockout-text

Conversation

@techmannih

Copy link
Copy Markdown
Member

Summary

  • Enable silkscreen text knockout polarity handling in the shared vector text Gerber renderer.
  • Preserve text casing in Gerber output instead of forcing all vector text through toUpperCase().
  • Refresh the silkscreen knockout repro snapshot and make the repro a normal passing test.
  • Ensure requested silkscreen layers appear in the combined PCB + Gerber snapshot when pcb-stackup defines 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

@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
circuit-json-to-gerber Ready Ready Preview, Comment May 22, 2026 7:35am

Request Review

@techmannih techmannih changed the title [codex] fix silkscreen text knockout rendering fix silkscreen text knockout rendering May 22, 2026
@techmannih techmannih force-pushed the codex/silkscreen-knockout-text branch from 59109a2 to 6c1e180 Compare May 22, 2026 07:41
@techmannih techmannih marked this pull request as ready for review May 22, 2026 11:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread tests/fixtures/preload.ts
Comment on lines +320 to +321
if (enhancedSvg.includes(`class="${silkscreenClass}"`)) {
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant