WPF Flowdocument - Prevent line break before % sign -
i've got flowdocument generating document client, , it's getting line break don't like. there way mark section of text should avoid line breaks? this:
<paragraph>here paragraph there should <span nolinebreak=true>no line break</span> in part.</paragraph>
obviously, span doesn't have nolinebreak property, i'm wondering if there's equivilant functionality available, or if can me started on way of implementing spanwithnolinebreak class or runwithnolinebreak class?
update actually, 1 issue i'm having percent sign, there isn't space:
<paragraph>when print , ½% want one-half , '%' symbols not line break between them.</paragraph>
the & #x00bd; unicode ½ symbol. i'm getting line wrap between 1/2 , % though there's no space between them.
the unicode character "word joiner" (u+2060) intended purpose. "does not produce space prohibits line break on either side of it" (wikipedia). place between u+00bd , '%' prevent line break between them.
unfortunately, wpf (or perhaps typical fonts supplied windows) don't support properly, , instead render square box. alternative, use u+feff; use of character zero-width non-breaking space deprecated (it's reserved use byte-order mark), worked line-break-preventer me.
finally, there other characters can used purpose: u+202f (narrow no-break space) prevents breaking, renders thin space. u+00a0 (no-break space) prevents breaking , displays normal space.
Comments
Post a Comment