Skip to content

feat: Add pcbStyle.silkscreenFontSize support for global silkscreen text sizing - #1597

Merged
ShiboSoftwareDev merged 3 commits into
tscircuit:mainfrom
Asymtode712:pcbStyleFeat
Oct 28, 2025
Merged

ShiboSoftwareDev merged 3 commits into
tscircuit:mainfrom
Asymtode712:pcbStyleFeat

Conversation

@Asymtode712

@Asymtode712 Asymtode712 commented Oct 28, 2025 •

Copy link
Copy Markdown
Contributor

PR Description

This implementation adds support for controlling silkscreen text font size globally via pcbStyle.silkscreenFontSize, enabling consistent text sizing across all silkscreen elements on a board.

Changes done

  • Updated @tscircuit/props dependency to ^0.0.384 to support pcbStyle prop
  • Modified doInitialPcbPrimitiveRender() to check board's pcbStyle.silkscreenFontSize
  • Applied cascading font size logic: explicit fontSize prop → pcbStyle.silkscreenFontSize → default (1)
  • Updated getPcbSize() method to use the same font size resolution logic
  • Added test to verify pcbStyle.silkscreenFontSize correctly sets font size for silkscreen text

fixes #1596
/claim #1596

@vercel

vercel Bot commented Oct 28, 2025 •

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview Comment Oct 28, 2025 5:10am

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Close, youll want to use something like getInheritedPropery, also use the ?? operator instead of an if else

@seveibar

seveibar commented Oct 28, 2025 •

Copy link
Copy Markdown
Contributor

this is probably out of scope for the first PR but we will want to provide something called resolvedPcbStyle to the footprint map so that the CAD footprint loader uses this silk screen font size instead of the one in kicad

@Asymtode712

Copy link
Copy Markdown
Contributor Author

this is probably out of scope for the first PR but we will want to provide something called resolvedPcbStyle to the footprint map so that the CAD footprint loader uses this silk screen font size instead of the one in kicad

Sounds like a good step ahead of this merger

@Asymtode712
Asymtode712 requested a review from seveibar October 28, 2025 04:58

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes a snapshot is nice

@Asymtode712

Copy link
Copy Markdown
Contributor Author

@seveibar @techmannih added the snapshot

@ShiboSoftwareDev
ShiboSoftwareDev merged commit 184601b into tscircuit:main Oct 28, 2025
1 check passed
@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Comment posted by tscircuitbot

This branch was successfully deployed

1 active deployment
Preview — d45db951 Deployed Oct 28, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support resizing kicad fonts with pcbStyle.silkscreenTextFontSize

5 participants