> Your patch assumes that an UTF8 character initiates a new word. That is
> wrong for the most European language, if not for all. So there must be
> another solution. Maybe a hybrid of word and character wrap? I.e. try to
> wrap a word (separated by a white space) first, if this is not possible, do
> a character wrap. I don't know if this is a good solution. But it would work
> at least for European languages and Chinese more or less.

I know my patch is far from perfect.  It is merely good for my own purpose.
Does the current (svn) implementation of the word-wrapping works for
European languages?

>
> Regards Peter
>>
>> Here is the simple patch:
>> Index: canvas/evas_object_textblock.c
>> ===================================================================
>> --- canvas/evas_object_textblock.c      (revision 43223)
>> +++ canvas/evas_object_textblock.c      (working copy)
>> @@ -1607,6 +1607,16 @@
>>  _layout_word_start(char *str, int start)
>>  {
>>    int p, tp, chr = 0;
>> +
>> +   //
>> +   // coolbrian: break if the word is not within the ASCII range
>> +   //   @note This is good for breaking up Chinese words, which are
>> made of Chinese characters.
>> +   //         Chinese characters do not look strange if they are not
>> grouped to form a 'phrase'.
>> +   //         Also, Chinese 'phrases' are of too many patterns and
>> probably need a dictionary to look up.
>> +   //         That would be too much.
>> +   //
>> +   if (((unsigned char)str[start]) >= 0x80)
>> +     return start;
>>
>>    p = start;
>>    chr = evas_common_font_utf8_get_next((unsigned char *)(str), &p);
>>
>>
>>
>
>



-- 
brian
------------------

Cool-Karaoke - The smallest recording studio, in your palm, open-sourced
http://cool-idea.com.tw/

iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to