[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: Implementing hyphenation / wordwrap for Thai
From:       Reginald Stadlbauer <reggie () troll ! no>
Date:       1999-09-11 21:43:00
[Download RAW message or body]

On Fri, 10 Sep 1999, Rudiger Koch wrote:
Hi!
Unfortunately I was away for a few days so I couldn't follow the whole thread.
Also unfortunately I'm currently full with work but ASA I can find some time
I'll think about a way this can be done efficient and fast (that's the most
important part here!!!!!!!)

Also if somebody wants to work on it: Please don't commit changes in the
formatting suff, kernel, etc. This part of KWord is very complicated and
optimized, so if you don't know everything about it it's very easy to break it.
So please send me patches.

>On Fri, 10 Sep 1999, Jo Dillon wrote:
>> 
>>   Ok, I think I see. Hmmm, I don't know exactly how kword represents
>> text internally, but I suspect it's possible to have some sort of marker
>> within the structures holding the text.
>
>After looking through the sources is seems to me that a paragraph object
>separates the actual text and the layout. But I really don't understand how
>it works so I'd appreciate some input from the KOffice gurus. Please keep
>in mind that the approach should work for other Apps, KMail for instance.

That's easy, what do you not understand? A paragraph contains the text which is
a KWString and the style (paragraph layout). Both have NOTHING todo with word
wrap. This is done in the format context. This one looks for spaces to break a
line. I guess for the Thai stuff we would have to indroduce another special
character which acts as a marker for linebreaking (is invisible). When
changing a paragraph the markers for the changed part have to be updated. And
when the formatcontext does the linebreaking it doesn't look for spaces but for
the special char.

As I said, the only problem will be to make the updating of markers (special
chars) efficient.

BTW: You will never be able to use the same code for all KDE apps. It will work
the same for most, but as KWord's string class does a bit more than just
working with strings, you will need some different code there.

>- I couldn't get Thai fonts to show up in KWord and KIllustrator, probably
>  because they don't use X fonts. Do they use Ghostscript fonts? I 

They use X fonts!!!!!!!

--
Reggie

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic