Subject: [HowTo] use netscape for Big5 and create Chinese menu bars

From: Jing-Shin Chang <[email-masked]>
Date: Wed, 22 Nov 1995 06:31:16 CST

| Date: Tue, 21 Nov 1995 12:44:08 PST
| From: Paul Law <[email-masked]>
|
| Has anyone been able to setup Netscape Navigator 2.0b2 (UNIX) to use
| big5 font files for HTML pages encoded in big5? I use a set of big5
| fonts for Mosaic 2.4 L10N for HP-UX and Linux without problem. It
| seems to me that Netscape doesn't like my current font environment. I
| get the following message every time Netscape is started up:

1. You should use *CNS font* files, *NOT* big5 font files which were
        used for cxterm or other packages. Nescape (more precisely,
        X11R5 against which netscape was linking) are using CNS11643
        as the internal encoding for showning Big5 or CNS articles.

   Note that, unlike Big5, which use one font file for both the most
   frequently used characters and less frequently used characters,
   the CNS fonts has (at least, up to now) 7 character planes. Planes
   1 and 2 characters is a superset of Big5 characters. So you have
   to get both plane-1 and plane-2 characters.

   Get them from ftp.ifcss.org:/pub/software/fonts/cns/bdf

   for cns1hku16.bdf.gz, cns2hku16.bdf.gz and/or cns-?24.bdf.gz

   (You can use your original Big5/Other fonts to customize the various
    menu bottons into chinese/big5 though. See step 3. below.)

   Installation of fonts include:

        1. copy fonts to your font directory

           For BDF format, you can use 'convertfont' (SUNOS) or
           'bdftopcf' (generic X) to get the properly formatted
           font files.

        2. edit font aliases

           in SunOS:
                1. edit Synonyms.list
                2. run 'bldfamily'

           in generic X11R5/R6 environments:
                use the 'mkfontdir' command
                and edit 'fonts.alias'

           (see manual pages for detail)

        3. include the font paths if the font directory is
           not in default font directories:

           xset fp+ your_font_dir
           xset fp rehash

           (These statements can be included at the end of
           your .xinitrc.)

2. After installing the CNS fonts, use 'xlsfonts' to see what the
   charset-encoding fields of the font files are so that you can set
   $HOME/.Xdefaults correctly. For example:

   if 'xlsfonts | grep cns' gives you:

   -cbs-song-medium-r-normal-fantizi-40-400-75-75-c-400-cns11643.1992.1-0
   -cbs-song-medium-r-normal-fantizi-40-400-75-75-c-400-cns11643.1992.2-0
   -hku-fixed-medium-r-normal--16-160-72-72-c-160-cns11643.1992.1-0
   -hku-fixed-medium-r-normal--16-160-72-72-c-160-cns11643.1992.2-0

   then add the following lines to your $HOME/.Xdefaults to match
   the suffices 'cns11643.1992.1-0' and 'cns11643.1992.2-0' as follows:

   Netscape*documentFonts.charset*cns11643.1992.1-0:       x-cns11643-1
   Netscape*documentFonts.charset*cns11643.1992.2-0:       x-cns11643-2

   (*cns11643.1992.1-0: CNS plane-1 characters, *.1992.2-0: plane-2 chars)
   (*. Don't comment out plane-2 chars, i.e., x-cns11643-2 lines,
       otherwise, some less frerquently used chars in Big5 will be
       invisible, although the chance is small.)

   You don't need to care about those '...charset*big5.hku' stuffs
   because, obviously, Netscape are not using them directly for display.

   (That's why your Big5 fonts does not work no matter how many Big5
   fonts you have in your system.)

   But, to avoid the error messages as shown in your email, you could
   follow the same way to add things like:

   Netscape*documentFonts.charset*big5.XYZ-0:   big5

   So that it won't produce messages like"

        charset fixed big5.XYZ-0
        internal fixed big5.XYZ-0 big5.XYZ-0
        charsetlang big5.XYZ-0

   (These messages mean that netscape found something in your font
   aliases like *-big5.XYZ-0, but the resource file $HOME/.Xdefaults
   or Netscape(.ad) does not contain such stuffs.)

3. To change the menu items into Chinese strings, you can change
   the 'fontList' property of the various menu objects. (This trick
   is not mentioned in netscape docs. It is simply a general X
   practice.) For example, if you want to change the "File" menu
   into Chinese "Dang3-An4", you could change, according to Netscape.ad:

   *menuBar.file.labelString:              File

   into ($HOME/.Xdefaults)

   Netscape*menuBar.file.labelString:   Dang3-An4 (CNS string)
   Netscape*menuBar.file.fontList:\
   -cbs-song-medium-r-normal-fantizi-40-400-75-75-c-400-cns11643.1992.1-0

   where Dang3-An4 is a CNS string for "File" and the associated
   fontList is the font name or font alias of a (list of) CNS fonts.

   If you don't have a way to enter CNS strings, you can enter Big5
   (or even GB) strings and use some conversion utilities,
   like 'ccf' in the BeTTY package to make such conversion:

        ccf -bn < .Xdefaults.b5 > .Xdefaults(.cns)

   Another way is to use a Big5 font directly without such conversion:

   Netscape*menuBar.file.labelString:   Dang3-An4 (Big5 string)
   Netscape*menuBar.file.fontList:      big5_font_name_or_alias

   The same should be true if you have some GB fonts.

   Note: if you want to use English and Chinese in the same menu bar,
   you must use the 'Full-width' english symbols, instead of ASCII
   characters, in the above strings. This is a limitation of X11's
   current implementation; it only associate one character set with a
   string; it won't allow something like ASCII+Big5 or ASCII+GB
   mixture in the objects.

4. You can now use netscape to read Big5 WWW site articles after
   making the resource available to netscape as follows:

        xrdb -merge $HOME/.Xdefaults    # if you are currently in X
        netscape &
        (choose 'option -> language Encoding -> Big5')

|
| face normal-r
| face normal-r
| face normal-r
| face normal-r
| face normal-r
| charset fixed big5.hku-0
| internal fixed big5.hku-0 big5.hku-0
| charsetlang big5.hku-0
| charset fixed big5.hku-0
| internal fixed big5.hku-0 big5.hku-0
| charsetlang big5.hku-0
| charset fixed big5.hku-0
| internal fixed big5.hku-0 big5.hku-0
| charsetlang big5.hku-0
| charset ming big5.hku-0
| internal ming big5.hku-0 big5.hku-0
| charsetlang big5.hku-0
| charset ming big5.hku-0
| internal ming big5.hku-0 big5.hku-0
| charsetlang big5.hku-0
|
| Does anyone know what's the proper way to setup the font environment
| for Netscape or what these messages mean?
|
| Thank you for any information.
|
| Paul Law
| [email-masked]
|