On Wed, 2011-10-19 at 16:28 -0400, Allin Cottrell wrote:
> I have some text I'm displaying via pango and while in general 
> I want to allow automatic line breaks, I want to prevent line 
> breaks from occurring in certain contexts.
> 
> Specifically, what I'm trying to avoid is the breaking of 
> option-flag strings such as "--quiet" in online documentation 
> (with "--" appearing on one line and "quiet" on the next).

What I've tended to do in this sort of situation is insert a "Zero Width
Word Joiner" character (it's U+200D, see General Punctuation in
`gucharmap`) into my text where I want to inhibit breaks happening
mid-word when line wrapping is happening.

[the one that gets me is function(args) getting split before the '('
character, so I stream out f u n c t i o n ZWJ ( a r g s ) or so]

For me this is Pango rendering via Cairo to PDF, so I'm not worrying
about this messing up offsets in an GtkTextView editor. I haven't found
a good way to handle that.

AfC
Prague

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to