02/14/96 Please beware that this page is constantly evolving. Things may not work as advertised and there is a high probability of errors and omissions. If you want to see this page improved, please send your comments to MBoshernitsan@lbl.gov
Coming (soon?):
xset(1)
xlsfonts(1)
NOTE: If your X server is configured to use the font server for fonts (sure
thing if you are using an X terminal), you have no choice but to install the
fonts globally, where the font server can find them. You can tell if you are
using a font server by typing "xset q"
at the
prompt and looking toward the end of the output for the section named "Font
Path". If this section contains a whole bunch of path names, you are probably
in the good shape. If, instead, it contains "tcp/...", you are out of luck --
go bug your system administrator.
This should create cronyx subdirectory with a whole bunch of files in it.% cdIf you have downloaded the .gz file:% gunzip < cronyx.tar.gz | tar xvf -or, if you have downloaded the .Z file:% zcat cronyx.tar.Z | tar xvf -
This will compile the fonts for the architecture you are using. To save the disk space, the font files are also compressed by% cd cronyx % make
compress(1)
. If your server cannot read compressed fonts,
you can decompress them by typing "uncompress
*.Z"
at the prompt or editing the Makefile to prevent
compression in the first place.
Note on font formats (read this if you are curious): The fonts are distributed in Binary Distribution Format (BDF), although all X servers can understand this format, the files in this format are large and the loading of the fonts is slower (not to mention the disk space). Compilation converts the font files into Portable Compiled Format (PCF). The files in this format are much smaller and are optimized to be read by the platform for which they are compiled. Although, other platforms can read PCF as well (hence the name), the reformatting takes time, so compile on the platform you use the most.
Also, make sure that all directories leading to it are also readable and searchable by others. Not doing so, may result in mysterious error messages from% chmod o+rx . % chmod o+r *
xset(1)
.
If you get mysterious error messages about failing requests, see the FAQ list for possible causes.% xset fp+ `pwd` % xset fp rehash
You should see a listing of about 70 fonts scroll by your screen. If% xlsfonts '*koi8*'
xlsfonts(1)
replies with "pattern *koi8* unmatched", you've
got a problem.See the FAQ list for possible solutions
% rm *.bdf
Where <full-path-to-font-dir> is precisely whatxset fp+ <full-path-to-font-dir> xset fp rehash
pwd(1)
returns within the font directory.
You can leave the file empty for now -- you will want to add stuff to it later.xrdb -l .Xresources
and reload the resource database:Netscape*documentFonts*registry: koi8 Netscape*documentFonts*encoding: r
Now, restart Netscape, and test Cyrillic fonts.% cd % xrdb -l <resource-file-name>
and reload the resource database:Netscape*documentFonts.defaultFont*iso-8859-2.prop: cronyx-times-120-noscale Netscape*documentFonts.defaultFont*iso-8859-2.fixed: cronyx-courier-100-noscale Netscape*documentFonts.charsetlang*iso-8859-2: Russian Netscape*documentFonts.charset*koi8-r: iso-8859-2 Netscape*menuBar*latin2.labelString: Russian (KOI-8)
Now, restart Netscape, go to the Options menu and select General Preferences.... This should open a dialog box. Select Fonts, change encoding to Russian (iso-8859-2), change proportional font to Times (Cronyx), and change fixed font to Courier (Cronyx). You can switch to Cyrillic by going to the Options/Document Encoding menu and selecting Russian (KOI-8) encoding. You should now be ready to test Cyrillic fonts.% cd % xrdb -l <resource-file-name>
See the FAQ list for information on how to set up Cyrillic fonts in Mail, News, Address Book, Bookmark windows, menus, dialogs, etc.
Netscape 3.x (finally) includes some limited support for Cyrillic characters, so you only need to add two lines to the resource file, telling Netscape which fonts to use:
That's it. You should now reload the resource database, restart Netscape and test Cyrillic fonts.Netscape*documentFonts.defaultFont*koi8-r.prop: cronyx-times-120-noscale Netscape*documentFonts.defaultFont*koi8-r.fixed: cronyx-courier-100-noscale
Unfortunately, Netscape 3,x still does not use Cyrillic fonts outline/subject lists for Mail, News, Address Book, and Bookmark windows. Consult FAQ list for information on how to set this up.
Don't forget to reload the resource database and restart Emacs. To be able to view and input Cyrillic with Emacs, you will also need to turn on the support for international characters by adding the following lines to .emacs file (this file may be in your home directory, if it's not there -- create it):emacs*font: -cronyx-fixed-medium-r-normal--13-120-75-75-c-80-koi8-r
You will also need to set up your keyboard to be able to input Cyrillic characters. See Frequently Asked Questions list for information on how to do that.(standard-display-european t) (set-input-mode (car (current-input-mode)) (nth 1 (current-input-mode)) 0)
A better approach that does not require special keyboard setup and
allows Emacs commands to be issued in KOI-8 insertion mode, is to use
russian.el mode. This file is available at ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/russian.el.Z.
You will need to uncompress (using uncompress(1)
) and
install this file in cronyx directory, and add the
following line to your .emacs file (Note that you no
longer need to add any of the stuff mentioned above):
See the beginning of the russian.el file for the information on how to use this mode.(load-file "~/cronyx/russian.el")
See the FAQ list for instructions on configuring keyboard under X Window System.
Proportional font:
Fixed font:
This is what Cyrlillic letters look like in your browser:
Proportional font:
Á Â × Ç Ä Å Ö Ú É Ê Ë Ì Í Î Ï Ð Ò Ó Ô Õ Æ È Ã Þ Û Ý ß Ù Ø Ü À Ñ
á â ÷ ç ä å ö ú é ê ë ì í î ï ð ò ó ô õ æ è ã þ û ý ÿ ù ø ü à ñ
Fixed font:
Á Â × Ç Ä Å Ö Ú É Ê Ë Ì Í Î Ï Ð Ò Ó Ô Õ Æ È Ã Þ Û Ý ß Ù Ø Ü À Ñ
á â ÷ ç ä å ö ú é ê ë ì í î ï ð ò ó ô õ æ è ã þ û ý ÿ ù ø ü à ñ
xset(1)
The xset(1)
program (part of X11 distribution) is notorious
for indecipherable error messages such as these:
The version supplied with X11R6 is a little better since it is somewhat more eloquent, but even its error messages are sometimes difficult to understand.X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 51 (X_SetFontPath) Value in failed request: 0xa Serial number of failed request: 4 Current serial number in output stream: 6
If you get something like the above from xset(1)
the first
things to check are:
xset(1)
from a shell script, don't forget that some
shells (sh, ksh) do not understand the tilde (~) shortcut for the
home directory.other
and font files must be readable
by other
, otherwise, the X server can't find
fonts."mkfontdir ."
in font
directory.
xlsfonts(1)
First off, make sure that you are doing "xlsfonts
'*koi*'"
(an asterisk before and after "koi"). If this
does not show any fonts, try looking at
fonts.dir in cronyx
directory, it should show something like this:
koi10x20.pcf.Z -cronyx-fixed-medium-r-normal--20-200-75-75-c-100-koi8-r koi12x24.pcf.Z -cronyx-fixed-medium-r-normal--24-170-100-100-c-120-koi8-r koi10x16b.pcf.Z -cronyx-fixed-bold-r-normal--16-120-100-100-c-80-koi8-r ...If this files is empty, or not there, it is possible that your X server does not recognize compressed fonts, in that case, type
"uncompress *.Z"
followed by
"mkfontdir ."
, and repeat the stuff with
"xset fp+ ..."
and "xset fp
rehash"
. Also, it is possible that your
xset(1)
does not show error message, so make sure that all
permissions are set correctly. Lastly, it is absolutely necessary for
font directory to be accessible on the machine which is running the X
server (i.e. this will not work with fontservers and such). One more thing, some system administrators do not allow users to install their fonts and disable or cripple the corresponding commands. This is another thing to check.
If you followed the instructions for Netscape 2.x/3.x, you may have noticed that Netscape still uses its standard fonts for outline/subject lists in Mail, News, Bookmarks, and Address Book windows. To fix that, add the following lines to .Xresources/.Xdefaults file:
Note that there should be no spaces after commas. Reload the resource file and restart Netscape. You should now be able to see Cyrillic in message/article subjects, bookmark window, etc. To test, try reading relcom.humor newsgroup.Netscape*XmLGrid*fontList:\ -*-helvetica-medium-r-*-*-*-100-*-*-*-*-koi8-r,\ -*-helvetica-bold-r-*-*-*-100-*-*-*-*-koi8-r=BOLD,\ -*-helvetica-medium-o-*-*-*-100-*-*-*-*-koi8-r=ITALIC
To have Netscape use Cyrillic fonts virtually everywhere, add the following lines to the resource file:
(Note that this already includes all changes needed to Cyrillify outline/subject lists in Netscape Mail, News, Bookmarks, and Address Book windows.) Reload the resource file and restart Netscape. You should now be able to see Cyrillic everywhere. To test, try visiting some homepage with Russian in the title.Netscape*fontList: -*-helvetica-bold-r-*-*-*-140-*-*-*-*-koi8-r Netscape*XmTextField.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r Netscape*XmText.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r Netscape*XmList*fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r Netscape*menuBar*fontList: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-koi8-r Netscape*menuBar*historyTruncated.fontList: -*-helvetica-medium-o-*-*-*-120-*-*-*-*-koi8-r Netscape*popup*fontList: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-koi8-r Netscape*topArea*fontList: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-koi8-r Netscape*topArea*XmTextField.fontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-koi8-r Netscape*topArea*XmText.fontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-koi8-r Netscape*mouseDocumentation.fontList: -*-helvetica-medium-r-*-*-*-120-*-*-*-*-koi8-r Netscape*docinfoButton.fontList: -*-helvetica-medium-r-*-*-*-120-*-*-*-*-koi8-r Netscape*mailto*urlLabel.fontList: -*-helvetica-medium-r-*-*-*-140-*-*-*-*-koi8-r Netscape*licenseDialog*text.fontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-koi8-r Netscape*XmLGrid*fontList:\ -*-helvetica-medium-r-*-*-*-100-*-*-*-*-koi8-r,\ -*-helvetica-bold-r-*-*-*-100-*-*-*-*-koi8-r=BOLD,\ -*-helvetica-medium-o-*-*-*-100-*-*-*-*-koi8-r=ITALIC
Some sites specify the character set with every page they send you. When this happens to be the case, their settings override your settings in Options/Document Encoding menu. Some Russian-language sites (National News Service, for example) set koi8-r as the desired character set. (This can be verified by selecting View/Document Info from the menu.) Unfortunately, koi8-r is not one of the character sets built into Netscape 2.x, and so you cannot view these pages with 2.x version of Navigator. Fortunately, release 3.0 of Netscape Navigator (at least starting with 3.0b4) does support koi8-r character set and will display these pages correctly. You can follow the instructions above to set up Netscape 3.x.
Window titles are controlled by a separate program called window manager and not by Netscape. To use Cyrillic fonts in window titles, refer to your window manager documentation.
The PostScript font names are hardcoded inside Netscape, and hence there is no way to instruct Netscape to use Cyrillic fonts. To work around this limitation, save the document you wish to print using File/Save As... and follow the instructions for printing KOI-8 to PostScript printers.
To print KOI-8 text to PostScript printer you will need a special program-converter. One such program, a2ps is available here as ftp://genome.lbl.gov/pub/maratb/a2ps.tar.gz (GNUzipped tar archive) and as ftp://genome.lbl.gov/pub/maratb/a2ps.tar.Z (Compressed tar archive). Unfortunately, to use this program you need to compile it first. If you don't know how to compile programs on your computer, get some local guru to help you. Also, be sure to read all three README files for instructions.
First of all, if you are just editing some files and you are using Emacs 19.x, you should be able to get by without installing X Window keyboard mapping by using russian.el. See the section for Emacs 19.x for details.
If you need to input Cyrillic into some terminal-based editor, or any other program, for that matter, you will need to obtain and install X Window keyboard mapping. Firstly, you have to decide what kind of character mapping you wish to use:
To install the keyboard mapping, copy the .xmm file to cronyx directory and type:
That's it. You should now be able to switch your keyboard to Cyrillic mode with Caps Lock key. You may add the% xmodmap ~/cronyx/<your-.xmm-file>
xmodmap(1)
command to the startup
file. If you need to restore default keyboard mapping, load
default.xmm. Note, that keyboard mappings are applied
incrementally, so you should always load the default mapping before
attempting to reload the Cyrillic map.