README for Xcyr 2.3				Serge Winitzki, February 2000

	What is Xcyr?

The package "xcyr" is a collection of Cyrillic bitmapped fonts for the X
window system, in the "KOI8-C" encoding. "KOI8-C" is a new encoding
suggested for Russian, Ukrainian, Belarussian, Macedonian, and Serbian
Cyrillic texts. The KOI8-C encoding is fully compatible with the KOI8-R in
the letters area and the fonts can be used as direct replacement of the
KOI8-R fonts. The "xcyr" package provides a reasonably complete set of
screen fonts for everyday work.

Reasons to use KOI8-C instead of the KOI8-R are: (1) KOI8-C includes
"typographic" characters such as hyphen, dash, curly quotes, angular
quotes, section sign, number sign, etc. The encoding of these characters
coincide with the "windows" encoding (CP1251), i.e. you can read texts on
the web prepared by Windows users and recoded into KOI8-R by software that
is unaware of these characters. Using KOI8-C allows to browse this Web
content even if the browser is not fully aware of these characters. (2)
KOI8-C includes all Cyrillic letters used in Ukrainian, Belarussian,
Serbian, and Macedonian languages as well as some letters necessary for old
Russian orthography, namely the Cyrillic letters Yat', Fita, Izhitsa, and
Psi. The coverage of the letters area is analogous to the CP1251 encoding.

In comparison with KOI8-R, many linedrawing and other characters have been
replaced by various Cyrillic letters and most frequently needed typographic
characters. The removed characters were chosen according to the
consideration that they are in fact never used in modern computing
environments. In particular, the only available set of X window fonts in
the KOI8-R encoding (the "xrus" package of Andrey Chernov and its
descendants) never had any of the characters I removed from the KOI8-R map
and there seems to be no software that makes use of these characters.
Therefore, the replacement of KOI8-R by KOI8-C will not affect any current
computing environments, while at the same time it will enable the use of
non-Russian Cyrillic characters as well as typographic symbols.

All information about the new encoding "KOI8-C" is available at
	"http://members.tripod.com/winitzki/LS/koi8-extended.html"
	"http://www.geocities.com/CapeCanaveral/Lab/5735/1/koi8-extended.html"

Xcyr-2.3 is a descendant of the package Xrus-2.3 by Andrey Chernov. All
fonts have been proofread and improved and look somewhat better than
other available Cyrillic bitmap fonts. Slanted versions of fonts look
significantly smoother. I also added some extra fixed fonts.

Please see the file "xrus.README" for xrus-2.3 specific information. This file documents differences from xrus-2.3.

    How to install and use these fonts

a) You can use these fonts in place of the normal Cyrillic fonts
(KOI-8, KOI8-R, KOI8-U). The fonts will still contain extra characters
(yat', fita, extra typographical signs etc.) but will be labeled as
"KOI8-R" so you can use them for Web browsing or other applications
that do not know about "KOI8-C" but know about "KOI8-R".

A set of fonts generated in this way is available at the above address. To
generate the fonts from sources, you need to do the following: in the
source directory, execute the commands

    ./xcyr2koi8r.sh
    cd xcyr-2.3-koi8r; ./install.sh

(The last operation will take a while and a the end it will attempt to
install all fonts to /etc/X11/fonts/cyrillic but will probably fail unless
you are the root user.) As a result of this, there will be a directory
"xcyr-2.3-koi8r/cyrillic/" in which you'll find subdirectories "100dpi",
"75dpi" and "misc" with several "*.pcf.gz" files. You should copy the fonts
you want to some location where your X window system can find them, and run
"mkfontdir" there. It is not necessary to install all fonts, but you'll
need at least the files from "misc" directory (including fonts.alias) and
the files from one of "100dpi" or "75dpi" directories. The "100dpi" fonts
are generally larger sized and are better suited for high-resolution
displays.

b) If your X window system is old and does not support .pcf.gz font
compression, you should convert the fonts to .pcf.Z. This can be done by
running the command

    gzip -d *pcf.gz; compress *pcf

in each of the font directories.

c) You can generate an equivalent set of fonts in the "windows" encoding
(i.e. "cp1251"). The procedure is the same except you need to substitute
"xcyr2cp1251" for "xcyr2koi8r" in (a). The resulting fonts will be labeled
as having "rawin-r" encoding. Same can be done with the ISO8859-5 encoding
which may be needed for compatibility reasons (can use them in Netscape).
Fixed fonts will be aliased to "win10x20" and "iso10x20" instead of
"koi10x20" etc. You can also generate strict KOI8-U or KOI8-R subsets of
fonts using the scripts "xcyr2xukr.sh" and "xcyr2xrus.sh".

d) If you do not have root (administrator) privileges, you can install the
fonts in your user directory. Make a subdirectory or several subdirectories
with all .pcf.gz or .pcf.Z fonts, run "mkfontdir" there, and execute the
commands "xset +fp /home/yourusername/whatever/directory/" for each of the
subdirectories. After this command, the fonts in the subdirectory are
available for X applications. For example, you should be able to run a
terminal session as "xterm -font koi10x20". Run "xlsfonts | grep koi" to
get a list of all available KOI fonts.

e) To use the fonts in Netscape 4.x, you need to go to
Edit/Preferences/Fonts and select the "cronyx" family fonts for "Cyrillic
(KOI8-R)" encoding. Netscape will automatically recode Web pages in Unicode,
Windows-1251 or ISO-8859-5 encodings into KOI8-R and use the fonts. You may
want to also select Windows-1251 fonts. However, there is no accepted X
encoding for this code page. The Windows-1251 fonts in this package have
been (historically) labeled as having "rawin-r" encoding. You need to add
the following to your X resources:

Netscape*documentFonts.charset*rawin-r: windows-1251
Netscape*documentFonts.charsetlang*windows-1251: Cyrillic

This will enable Netscape to allow you to enter user-defined fonts under
"Cyrillic (CP1251)" in the Preferences dialog (if you have installed the
fonts labeled as "rawin-r").

    Summary of changes for version 2.3

1) Added more characters to all fonts.

The major difference between the packages "xcyr" and "xrus" is in the
addition of letters for other cyrillic languages (Ukrainian and
Byelorussian and some others) as well as the letters for old Russian texts
(Yat', Fita, etc.) in positions 128 to 191.  I have tentatively selected
some locations compatible with KOI8-U (Ukrainian and Belarussian) layout as
well as with the commonly used punctuation characters from the "Windows"
Cyrillic code page (1251). The result is proposed as the KOI8-C charset (C
for "Cyrillic"). More information about this experimental encoding is at
the Web page "http://www.linuxstart.com/~winitzki/koi8-extended.html".

2) Added the script "bdfrecode.pl" to automatically generate font sets
in KOI8-R, CP-1251, and in the "hacked" KOI8-R encoding. The scripts
"xcyr2xrus.sh", "xcyr2cp1251.sh" and "xcyr2koi8r.sh" create a
subdirectory with the BDF fonts changed according to these encodings.

The "hacked KOI8-R" means that the fonts remain in the KOI8-C encoding
but their registry is set to KOI8-R, so that most programs with
hardwired "KOI8-R awareness" can use them. After running one of these
scripts, go to the created subdirectory such as "xcyr-2.3-1251" and run
"install.sh" or "make" there.

The script "bdfrecode.pl" automatically reshuffles and renames
characters in BDF fonts (without changing any glyph shapes) and writes
correct XFREE86_GLYPH_RANGES properties to the resulting fonts.

3) Added Unicode name table "unicode.names" and "KOI8-C" formal
charset description as necessary for Unicode conversion.

4) Added more "misc" fixed fonts, e.g. 6x13, 7x14, 8x16, 9x15, 9x18, 12x24
with bold variants. Added "proof9x16" which is especially useful for
proofreading mixed English/Russian texts.

5) Modified the slanted font generation algorithm to prevent line breaking
and to (optionally) remove jagged lines (test show that jag removal
currently does not work very well at small sized fonts). Added options
"-nofill", "-dejag", "-factor" to the slanted font generation script.
Speeded up the bold/slant generation scripts by about 2x. Modified the slanted font bounding box algorithm for better spacing.

6) Added script "bdftrim.pl" to trim empty pixels and "bdf2xbm.pl" to
generate XBM bitmaps and optionally PNG for each character.

	-- Serge
