Re[2]: 0.7.12 for Monday?

Subject: Re[2]: 0.7.12 for Monday?
From: hashao (
Date: Wed Nov 08 2000 - 07:47:00 CST

Hello Vlad,

On Wednesday, November 08, 2000, Vlad Harchev wrote:

VH> As for CJK support - I think it would be feasible if someone will help Belcon
VH> to finish tracing. The only thing that doesn't work yet is import of RTF (for
VH> unknown reason). I invite CJK guys to help with this. I will post detailed
VH> description of the problem 7 hours later cc'ing to our CJK hackers.

The latest CJK patch with gdk_fontset_load did not work well for me
(Under zh_CN.GB2312). Before loading a font, the patch tests if a font
is_CJK_font. For non-CJKFont, it loads font with gdk_font_load.
Otherwise, gdk_fontset_load is used by constructing a fontset from the
given font and s_defaultNonCJKFont.

The problem is that since there are no tags in a .abw file to mark
CJKFonts, there could never be any CJKFont created at the first place.
A default iso-8859-1 font is always used. And all available fonts in
the style menu are iso-8859-1 ones. As the result, either CJK chars or
Westen Europe chars are displayed by the NonCJKFont's.

BTW: I have no special CJK font directory installed for abiword. I
just installed the old abiword package from Debian potato. Compile the
current CVS, set the environment according abiword script. And run the
compiled binary without installation. I am not sure if that caused my
problem. I think abiword specific font directory are for printing

I think the codes:
        if(!is_CJK_font()) {
          gdkfont = gdk_font_load(newxlfd);

           if (!gdkfont)
                   newxlfd = myXLFD.getFallbackXLFD();
                   requested_lfd = newxlfd;
                   gdkfont = gdk_font_load(newxlfd);

should use the similar algorithm as the 'else' clause followed it to
construct a fontset except reverse the sense of non-cjk parts and the
cjk parts.

I have tried just that. but since somehow the s_defaultCJKFont[s]
is not initialized if I put it in the above 'if' clause, I get
a segfault when I start the application. if I use:
           gdkfont = gdk_fontset_load(buf);
to replace the above gdkfont = gdk_font_load(newxlfd);
I can view Chinese with no problem except that the Chinese
font is out of proposition (as expected).

Anyway, I think the thing should be:
1. There should be someway to chose the current font face for
different locale (You can do that in Win2k application, based on
something MS called 'script'). Abiword use customized fontselector, so
this should be no problem.

2. Under a CJK environment, if a font chosen is NonCJKFont, current
CJKFont should be used together to construct a fontset. If a CJKFont
is chosen, the current NonCJKFont should be used together to construct
a fontset.

3. Under non-CJK environment, don't use fontset. This is listed here
because I don't know what ill effects fontset might have under some
other locales like Hebrew, Indi, etc. Most likely it is okey to use
fontset only.

Please consider this or help me to set up my environment correctly.

PS: I found that the encoding for CJK is decided by the current
LANG environment. I hope this can be changed to depend on LC_CTYPE.
LANG also set a lot of other locale properties which might not be what
a user want. Sometime, a user might want to use a English menu but
also want to edit a Chinese document. This is not feasible with the
current abiword.

And is there an command line option for 'make' to stop building
static binary for me? I don't care about a static binary when testing cvs.
It takes time. Also the 'make -j 4' will not compile successfully. I
do have a due celeron machine. :)

Best regards,

This archive was generated by hypermail 2b25 : Wed Nov 08 2000 - 07:47:35 CST