Re: regarding PANGO_WRAP_HYPHEN



On 13-06-06 09:55 AM, Parth Kanungo wrote:
Hello,

I want to implement PANGO_WRAP_HYPHEN, i.e. , I want to introduce a hyphen
when while laying out the text, the line has ended, but the word has not. I
figured that the functionality would be quite similar to PANGO_WRAP_CHAR.

May be fine doing it for PANGO_WRAP_CHAR itself, or instead, add a separate
pango_layout_set_hyphenate() and make it default to on.


After looking at the source code, I think that I have to change
process_item(). Through this function, I can adjust the break_width and
break_num_chars. However, I don't know how to insert a hyphen at the end of
the line. Could you tell me how that can be done?

The actual hyphen needs to be language-sensitive, but for an initial
implementation it should be fine doing something simpler.  What you need to do
is an awful lot like what's in ellipsize.c.  Check it out.

behdad

Any pointers on this would be helpful.

 

Thanks and regards,

--

Parth Kanungo


-- 
behdad
http://behdad.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]