Repository navigation
Description
Follow-up from #185152 (soft-hyphen rendering, part of #18443).
The Hyphens API added in #185152 controls whether the default hyphen glyph (-) is rendered at a soft-hyphen (U+00AD) line break (Hyphens.manual vs Hyphens.hidden). A separate enhancement is to let callers customize the hyphen character/string itself (e.g. a different dash, or a language-specific hyphenation mark).
This is being prototyped upstream in skparagraph: https://skia-review.googlesource.com/c/skia/+/1205922. Once that lands and a binding is exposed, Flutter could add a hyphenCharacter-style API on ParagraphStyle/TextStyle.
Tracking this separately from #18443, which tracks rendering the default hyphen. Raised in review of #185152 by @Renzo-Olivares.
Activity
Clarify web hyphens TODOs; split render-wiring from custom-string
8 remaining items
Renzo-Olivares commentedon Oct 15, 2026
@dbebawy That approach sounds good to me, though curious if @LongCatIsLooong had any thoughts. Maybe we should hold off on this customization until #189234 is fixed?
dbebawy commentedon Oct 21, 2026
@Renzo-Olivares #189234 is fixed now. The Skia change (https://skia-review.googlesource.com/c/skia/+/1396916) has been in master since Oct 20. It also handles custom hyphen strings, so the drawn hyphen is selected together with its soft hyphen whatever the string is. Skia now also leaves room for the hyphen when breaking lines (#194582), using the custom string's width.
So I think this is unblocked. I'll start on the
hyphenCharacterAPI unless @LongCatIsLooong would prefer a different shape.dbebawy commentedon Oct 24, 2026
@LongCatIsLooong Julia assigned this to me, so here is the shape I plan to use before I start:
String? hyphenCharacteronui.ParagraphStyle,TextPainter,RenderParagraph,RichTextandText, the same way ashyphens.nullkeeps the default hyphen, and the framework asserts that it is not empty, sinceHyphens.hiddenalready covers drawing nothing.TextStyle.getParagraphStyleparameter. That breaks classes that overridegetParagraphStyleagain, one release afterhyphensdid, so it would come with a migration guide.Is that OK, in particular the second
getParagraphStyleparameter?[canvaskit] Add softHyphenString to ParagraphStyle
Add ParagraphStyle.hyphenCharacter to dart:ui
[web] Pass hyphenCharacter to CanvasKit
Support soft hyphen (U+00AD) rendering with a Hyphens API (flutter#18…
Add ParagraphStyle.hyphenCharacter to dart:ui
[web] Pass hyphenCharacter to CanvasKit
Add ParagraphStyle.hyphenCharacter to dart:ui
[web] Pass hyphenCharacter to CanvasKit
Add ParagraphStyle.hyphenCharacter to dart:ui
[web] Pass hyphenCharacter to CanvasKit
Add ParagraphStyle.hyphenCharacter to dart:ui (flutter#195345)