Re: preventing wrapping on certain words only
- From: Dov Grobgeld <dov grobgeld gmail com>
- To: Ellié Computing Open Source Program <opensource elliecomputing com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: preventing wrapping on certain words only
- Date: Mon, 9 May 2011 11:19:44 +0300
Couldn't this be done by changing all spaces to NO-BREAK SPACE (U+00A0) in the section that should not be wrapped? But perhaps, you still have the problem of hyphenation. Does pango honor ZERO WIDTH NO-BREAK SPACE (U+FEFF)? Could you sandwich that between all characters of the section to prevent hyphenation?
On Mon, May 9, 2011 at 11:07, Ellié Computing Open Source Program <opensource elliecomputing com>
From: Behdad Esfahbod
Sent: Friday, May 06, 2011 10:01 PM
On 05/06/11 10:07, Ellié Computing Open Source Program wrote:
1. I’ve been investigating the Pango API, but could not find a way to
wrapping for specific portions of text. I saw the global wrapping option
WRAP_WORD / WRAP_CHAR / WRAP_WORD_CHAR using pango_layout_set_wrap ( ).
How should I do this?
The idea behind this is to be sure that a text such as “(...)“ (could be
well “/* ... */”) does not get wrapped.
Not quite possible right now.
I believe that using that shape technic it should be possible to first
2. Another question, how would I add a place holder for an image so that
could do something like: hello <img width=50 height=10>! in logic and
determine where the image should be?
Can I obtain that from Pango or should I use something else? more
top of it?
render the 'no-wrap' section then make it a 'shape' in the normal text, not
feasible in general but for very simple texts it could work. Of course
having a no-wrap attribute would be way more practical :)
] [Thread Prev