Skip to content

feat(#48): support letter spacing new property#58

Merged
francozanardi merged 3 commits into
mainfrom
feat/48-support-letter-spacing
Mar 29, 2026
Merged

feat(#48): support letter spacing new property#58
francozanardi merged 3 commits into
mainfrom
feat/48-support-letter-spacing

Conversation

@francozanardi

Copy link
Copy Markdown
Owner

Summary

  • Adds letter_spacing() to the fluent API, mirroring the CSS letter-spacing property
  • Accepts a pixel offset (letter_spacing(8)), a percentage of the space-character width (letter_spacing("10%")), or "normal" to reset
  • Negative values are supported (tighter tracking)
  • Inherited like line_height and text_box_edge — set once on Canvas or a container to apply to all child Text nodes

Closes #48

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.88889% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pictex/text/text_shaper.py 72.00% 3 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@francozanardi francozanardi merged commit 25187ca into main Mar 29, 2026
10 checks passed
@francozanardi francozanardi deleted the feat/48-support-letter-spacing branch March 29, 2026 05:34
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.

Letter spacing option

2 participants