Re: request for help from CJK hackers


Subject: Re: request for help from CJK hackers
From: Vlad Harchev (hvv@hippo.ru)
Date: Thu Nov 09 2000 - 04:09:50 CST


On Thu, 9 Nov 2000, Belcon Zhao wrote:

 Hello Belcon,

 It seems I found a solution to the problem. It's my silly bug in RTF
exporter. I'm very sorry for it. (Though I don't have CJK locale to test
solution). In ie_exp_RTF_listenerWriteDoc.cpp, in function
s_RTF_ListenerWriteDoc::_outputData there are following strings:
                                if (c>0x007f) {
                                        m_pie->_rtf_keyword("uc",0);
                                        signed short si = *((signed short *)c);
                                        m_pie->_rtf_keyword("u",si);

                                } else {
                                        *pBuf++ = (UT_Byte)c;
                                };
 They should be changed to:
                                if (c>0x007f) {
                                        FlushBuffer();
                                        m_pie->_rtf_keyword("uc",0);
                                        signed short si = *((signed short*)c);
                                        m_pie->_rtf_keyword("u",si);

                                } else {
                                        *pBuf++ = (UT_Byte)c;
                                };
I.e. FlushBuffer(); inserted.
Please report whether this solves the problem.
 If yes, then it seems AW is fully CJK-aware.

> Hello Vlad,abi-dev:
>
> >From: Vlad Harchev <hvv@hippo.ru>
> >To: Belcon Zhao <belcon@hotmail.com>
> >CC: abiword-dev@abisource.com
> >Subject: Re: request for help from CJK hackers
> >Date: Thu, 9 Nov 2000 10:12:12 +0400 (SAMT)
> >
> >On Thu, 9 Nov 2000, Belcon Zhao wrote:
> >
> > Hello Belcon,
[...]
> As I expect,.txt and .abw file are fine.Their sequence is good.
>
> >* Also save as html, latex - is there the same problem with CJK chars
> >
>
> Html file works fine.When I save .abw file as latex file,AW crashed.
> I almost know nothing about latex,so I ignore the message.If you are
> interested in this bug,I will test again and send the message to you.

 I'm sure it won't be difficult for you to trace this down. Where does it
crash?
 I guess it happens because XAP_EncodingManager::getTexPrologue() returns
NULL (though I fixed that problem in my last patch, that hunk seem to be
missing in CVS - didn't check it though).

[...]
> > Hmm, I don't understand you - what do you mean by "install
> >automatically"?
>
> Sorry.I mean that we can add a menu item to AW.This menu can
> popup a widget which contains a list and something else.In this
> list,there is all Truetype Font that your system have installed.
> you can choose which font or all font to be installed into AW.
> Then AW can generate some fonts.dir files according the fonts'
> encoding method in different subdirectories.
> You know that we can't guess what Truetype font that user has
> installed,so we have to generate special fonts.dir(like
> GB2312/fonts.dir or Big5/fonts.dir) when user use AW.

 I think it's author of distribution's task to generate fonts.dir for their
system and ship apropriate fonts.dir in AW package. So "average user"
shouldn't bother to know what is TTF and what is font path etc. Hackers that
know could do this task by hand.

> > I assume you propose to ship subdirectories with CJK fonts.dir with AW -
> >right? If everything that is required for Chinese (and probably
> >all CJK fonts) is subdirectory with fonts.dir in it, these directories
> >could
> >be added to AW distribution. So I agree with this.
>
> No,I don't mean this.The reason is above.

>[...]

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Thu Nov 09 2000 - 04:30:14 CST