You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support soft hyphenation (line breaks at U+00AD plus rendering a hyphen at the end of the line) #18443
I was surprised not to find a parameter to have automatic hyphenation in Text widgets (and the likes). I think it is a useful feature to get nice designs. Without it, justified text may be filled with ugly blank spaces if there are too many very long words.
Could text hyphenation be implemented in flutter, or does it sound like a bad idea for some reason ?
Thanks and congrats to the flutter team for the great job !
Reacted by Stefan Wienert, Feu, ZhangFan, Michael Hoehn, Larry-Liu2016, zhenglong, Xander Gottlieb, otozyon, Andrwyw, Edward zhang and 295 more
Reacted by Mattia Lorenzutti, Jochen Pfeiffer, Stancu Florin, Marino, Jovan Ceprkovic, orangebokov, Hadi, FantaMagier, Jannes Brands, Malte Nottmeyer and 3 more
Reacted by DP, Tim Rijckaert, Edwin Liu, behnam-lum, Behnam Sattar, dvigara, raegtime, Dmytro Fokin, Alexandr Semeniuk, Mabsten and 22 more
It seems that the word breaking and line breaking algorithms are present inside the engine. I'm wondering if they are wired up somehow or if they need to...
We are having huge issues in order to reach high fidelity without this feature.
Even manually inserting SHY (soft hyphens) doesn't help: the word and the line is correctly broken the right way but the hyphen symbol is not rendered before the line break.
Can someone please take a look? @Hixie@jason-simmons@chinmaygarde
Reacted by Jochen Pfeiffer, Michael Tamm and Jigar Patel
Currently we do not support hyphenation in Flutter text, but there are indeed hyphenation systems in minikin that we depend on. They are currently not wired up/integrated, but I believe hyphenation is something we would want to eventually support.
Reacted by ahzmie, Mark Kessler, Klas Petersson, Daniel Sperl, DenisGL, Ludwik Trammer, Marino, Richard and Z6P0
Please, this simple thing its actually a big deal, When we fetch from a service a string property to be displayed on a GridTile for example, there is no way to know when a word will break, its actually wrapping the word, an that's great, but the hyphen it's missing!
Reacted by Melanie Pittumbur, Edwin Liu and Mark Kessler
cc @chunhtai Your upcoming/recent ellipsis work may help alleviate some of the behavior that hyphenation is meant to address. In the current setup hyphenation would require packaging in large datasets with hyphenation information in it. Hyphenation may be able to be supported in future as we look at transitioning to Skia's text shaping library, which I believe hyphenation is planned for.
@GaryQian a rather simple solution would be to support hyphenation on strings where SHYs (soft-hyphens) are already present. Devs would need to take care of that part (it could either be a Dart library or a server-side solution), while the text rendering engine would just handle the insertion of the hyphens and the line breaks. Testing it with this string (taken from Wikipedia) you can see that incidentally on the web this behaviour is already supported, while on mobile the engine is already considering SHYs as good places to break words while the hyphens are not being added at the end of the lines where the breaks occur.
Soft hyphens now render as a hyphen at line breaks on all native platforms since #185152, and on the web with the Skwasm renderer since #193850. CanvasKit support is in review in #194339.
Customizing the hyphen string is tracked in #189617, and including the hyphen in the selection highlight in #189234.
Left: the old behavior (Hyphens.hidden). Right: the new default (Hyphens.manual).
Reacted by Nicolai Henriksen, Thomas Zimmermann and René Kilczan
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
zoechi commentedon Jun 13, 2018
@Hixie
sroddy commentedon Jul 3, 2018
It seems that the word breaking and line breaking algorithms are present inside the engine. I'm wondering if they are wired up somehow or if they need to...
sroddy commentedon Sep 4, 2018
We are having huge issues in order to reach high fidelity without this feature.
Even manually inserting SHY (soft hyphens) doesn't help: the word and the line is correctly broken the right way but the hyphen symbol is not rendered before the line break.
Can someone please take a look?
@Hixie @jason-simmons @chinmaygarde
GaryQian commentedon Sep 14, 2018
Currently we do not support hyphenation in Flutter text, but there are indeed hyphenation systems in minikin that we depend on. They are currently not wired up/integrated, but I believe hyphenation is something we would want to eventually support.
dmvvilela commentedon Apr 29, 2019
darkmarthur commentedon May 18, 2019
Please, this simple thing its actually a big deal, When we fetch from a service a string property to be displayed on a GridTile for example, there is no way to know when a word will break, its actually wrapping the word, an that's great, but the hyphen it's missing!
2dxgujun commentedon Jul 12, 2019
+1
GaryQian commentedon Aug 19, 2019
cc @chunhtai Your upcoming/recent ellipsis work may help alleviate some of the behavior that hyphenation is meant to address. In the current setup hyphenation would require packaging in large datasets with hyphenation information in it. Hyphenation may be able to be supported in future as we look at transitioning to Skia's text shaping library, which I believe hyphenation is planned for.
sroddy commentedon Sep 13, 2019
@GaryQian a rather simple solution would be to support hyphenation on strings where SHYs (soft-hyphens) are already present. Devs would need to take care of that part (it could either be a Dart library or a server-side solution), while the text rendering engine would just handle the insertion of the hyphens and the line breaks. Testing it with this string (taken from Wikipedia) you can see that incidentally on the web this behaviour is already supported, while on mobile the engine is already considering SHYs as good places to break words while the hyphens are not being added at the end of the lines where the breaks occur.
pph7 commentedon Nov 13, 2019
I was also surprised to see that such a basic feature is not implemented in flutter. Ist there any timeline on this?
99 remaining items
Point web hyphens TODOs at flutter#193506
Support soft hyphen (U+00AD) rendering with a Hyphens API
Clarify web hyphens TODOs; split render-wiring from custom-string
Point web hyphens TODOs at flutter#193506
Support soft hyphen (U+00AD) rendering with a Hyphens API (flutter#18…
[skparagraph] Only render a soft hyphen where the line breaks at it
[skparagraph] Use surrounding run's bidi level in shapeEllipsis
Revert "[skparagraph] Use surrounding run's bidi level in shapeEllipsis"
Reland "[skparagraph] Use surrounding run's bidi level in shapeEllipsis"
[skparagraph] Add soft hyphen GM
dbebawy commentedon Oct 16, 2026
Soft hyphens now render as a hyphen at line breaks on all native platforms since #185152, and on the web with the Skwasm renderer since #193850. CanvasKit support is in review in #194339.
Customizing the hyphen string is tracked in #189617, and including the hyphen in the selection highlight in #189234.
Left: the old behavior (
Hyphens.hidden). Right: the new default (Hyphens.manual).Support soft hyphen (U+00AD) rendering with a Hyphens API (flutter#18…
github-actions commentedon Oct 30, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.