Repository navigation
feat: add underline and strikethrough decoration options - #36
Merged
Merged
Conversation
Decoration lines can now be styled independently of the text: DecorationColor, DecorationThickness and the line styles DecorationSolid, DecorationDouble, DecorationDotted, DecorationDashed and DecorationWavy. They apply to underline and strikethrough. The underline position of sub- and superscript text is configurable: UnderlinePositionAuto (default, unchanged behavior), UnderlineAtBaseline (aligned with surrounding text) and UnderlineBelowGlyphs (directly below the shifted glyphs). Closes #11 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
StrikethroughThroughGlyphs (default, unchanged behavior) draws the line through the shifted glyphs. StrikethroughAtBaseline draws it at the position and thickness of normal text, giving one continuous line across formulas like E=mc². Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Added in 826b769: |
1fabi0
approved these changes
Oct 7, 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 #11
What
New text style methods on
TextStyleand span descriptors:DecorationSolid()(default),DecorationDouble(),DecorationDotted(),DecorationDashed(),DecorationWavy()DecorationColor(string), independent of the text colorDecorationThickness(float), in pointsUnderlinePositionAuto()(default),UnderlineAtBaseline(),UnderlineBelowGlyphs()Line style, color and thickness apply to underline and strikethrough (like CSS
text-decoration-*). All properties take part in normal style inheritance.Compatibility
Solid,Auto, text color, font thickness) reproduce the current output exactly; solid lines still go through the existing rectangle drawing.ICanvas(internal) getsDrawTextDecorationfor dotted, dashed and wavy lines (Skia path effects / paths). No public breaking change.Verification
TextDecorationTests: placement for each position mode, color/thickness/style for underline and strikethrough, inheritance, validation, full PDF generation).TextExamples.DecorationStylesandTextExamples.SuperscriptSubscript_UnderlinePositionrendered and checked visually.Docs
docs/reference/text.md: new subsections for decoration line options and underline position, updated style table and library defaults. AGENTS.md current focus updated.🤖 Generated with Claude Code