Re: May I take part in AbiWord CJKV develope? (fwd)


Subject: Re: May I take part in AbiWord CJKV develope? (fwd)
From: Vlad Harchev (hvv@hippo.ru)
Date: Mon Oct 23 2000 - 09:08:50 CDT


On Mon, 23 Oct 2000, hj wrote:

>
> ----- Original Message -----
> 发件人: Vlad Harchev <hvv@hippo.ru>
> 收件人: Belcon <rainfall@yeah.net>
> 抄送: <abiword-dev@abisource.com>
> 发送时间: 2000年10月23日 17:15
> 主题: Re: May I take part in AbiWord CJKV develope? (fwd)
>
>
> > On Mon, 23 Oct 2000, Belcon wrote:
> >
> > Hi Belcon,
> >
> > > Hello Vlad:
> > > > > I am glad to hear this.:-).But I still need learn something else.
> > > >
> > > > Moreover, this (or previous) week someone announced the existance of
> patches
> > > > for support of chineese in AW! (Seems this is your 1st target).
> > > > Here is a location of the patch:
> > > > http://www.hj.webprovider.com/develope/index.html
> > > > I will forward that message with URL of screenshot to you too.
> > >
> > > Yes,I already know that place.I think this is a great work.
> >
> > As I understand it, this patch only supports Big5 and not GB2312, right?
>
> This patch only supports GB2312. You must modify fonts.hj if you want it
> support Big5.

 Will this change bring full support for Big5? What is fonts.hj (kinda
fonts.dir?)
 The CVS version of AW looks for locale-specific fonts under subdirectory with
name of the encoding, so for locale CP1251 AW will look into fonts/CP1251 for
fonts and will load all fonts (replacing already-loaded existing fonts) from
that directory. I think this approach should be adapted for CJKV branch of AW.
 
> > I think the only location you should look is
> > GR_Graphics::remapGlyph in file src/af/gr/xp/gr_Graphics.cpp
> > once you successfuly can map Unicode character to some wide character in
> > your locale. The result of mapping should be ready for drawing by
> > gdk_draw_text_wc()
> > in GR_UnixGraphics::drawChar() or GR_UnixGraphics::drawChars
> > That's all.
> > That's rather easy to achive IMO. The problem can be caused by GTK/GDK -
> so
> > just look into sources of gdk_draw_text_wc() (they are very easy to
> > understand). Chances are that XLib is broken, and that causes your
> problem.
> > Feel free to ask any questions if they arise while you tweaking this..
> > The quick solution could be looking at mozilla sources - it uses gtk on
> > unixes.
> >
> > Once you've solved this, AW will support CJKV nicely.
>
> Does gdk_draw_text_wc() support UCS-2 or UTF8? I cann't display GB2312 with
> gdk_draw_text_wc(). So I convert unicode to mbs. Display GB2312 with
> gdk_draw_text().

 This should be explored :) In worst case sources of XLib should be
considered. May be your XLib is broken and doesn't support GB2312 properly.
 It definitely can't support UTF8 since UTF8 is variable-length encoding, and
 _wc suffix means "wide character", i.e. fixed-size encoding.
 But yes, in worst case Unicode should be first converted to mbs and then
drawn using gdk_draw_text() (though this for some reason doesn't work with
russian as far as I remember) or mbs should be converted wcs using
gdk_mbstowcs and then drawn using gdk_draw_text_wc().

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Mon Oct 23 2000 - 09:29:57 CDT