The TextWrapping feature in Silverlight is described here. However, I’m trying to find out the details of their line-breaking algorithm.
Obviously a space will cause the text to break (or split), encouraging the text to wrap to the next line. And through trial and error I’ve found that these characters also cause a split:
- \t (tab)
- –
- !
- ?
But I doubt this is the full list. Has anyone found the full list of split characters (including Unicode)? Or do you have any clever suggestions for figuring this out that I haven’t thought of yet? Trial and error can be slow.
I’d guess every character that qualifies as space or punctuation, excluding the explicitly non-breaking characters.
However, there is a specified algorithm for line breaking: Unicode Standard Annex #14: Unicode Line Breaking Algorithm.