Printing is always tricky. There are different printers from different vendors with different facilities. Even for a native printing there is no uniform solution (this applies not only to UNIX, but to other operating systems as well.
Printers have different control languages and often they have very different views on foreign language support. The good news is that on control language seems to be recognized as a de-facto standard for print job description - it is a PostScript language developed by Adobe Corporation.
Another problem is a variety of requirements to the print services. For example, sometimes you want just to print a piece if C program, containing comments in Russian, so you don't need any pretty-printing - just a raw ASCII output in a single font. Another time, when you design a postcard for your girlfriend, you'll probably need to typeset some document with different fonts etc. This will definitely require more effort to setup Cyrillic support.
To accomplish the former task you just have to make your printer understand one Cyrillic font and (maybe) install some filter program to generate data in appropriate format. To accomplish the latter one, you have to teach your printer different fonts and have a special software.
There is also something in the middle, when you get a program which knows how to generate both the fonts and the appropriate printer input, so you can say do some aource code pretty-printing without sophisticated word processing systems.
All these options will be more or less covered below.
If you have a good old dot matrix printer and all you need is to print a raw KOI8-R text, try the following:
rcfile at a boot time.
Thus, having Cyrillic characters in the upper part of the printer's character set will allow you to print you texts in Russian without any hussle.
Alternatively to the KOI8-R fonts you may try to use the Alt font. There are two reasons for that:
However in this case, you'll have to convert your texts from
KOI8-R to Alt before sending them to a printer. This is quite
easy, since there are a lot of programs doing that (see
translit for example), so you just have to
call such program properly in the
if field in
/etc/printcap file. For example, with the translit
program you may specify:
if=/usr/bin/translit -t koi8-alt.rus
See printcap(5) for details.
One great way to cope with different printers and fonts is to use TeX (see section tex). TeX drivers handle all details, so once you make TeX understand Cyrillic fonts, you are done.
Another possibility is to use PostScript. I decided to devote an entire chapter postscript to the subject, since it is not simple.
Finally, there are other word processors, which have printer drivers. I never tried anything apart from TeX, so I cannot suggest anything.