[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] cyrillic hyphenation with DVI backend
From: |
Grigoriy A. Sitkarev |
Subject: |
Re: [Groff] cyrillic hyphenation with DVI backend |
Date: |
Tue, 13 Dec 2011 13:34:20 +0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 |
You might also have a look at
http://lists.gnu.org/archive/html/groff/2011-08/msg00037.html
I also succeeded with adding cyrillic fonts from AMS Fonts and cmcyr
packages.
It seems that these are the exact files I use. Somebody posted them on
the groff Wiki too.
http://www.port.de/cgi-bin/groff/KoiToPS
I also tested my example with the files in that archive you posted in
the list.
It would be great if you can share your results here, on this list.
Here are the map files which I fed to tfmtodit when extracting font
files from cmcyr and AMS Fonts. Please, note that cmcyr has a bug in all
italic fonts: cyrillic letter `yo' is missing. That's why when the need
is to use italic font, I replace it with the AMS Fonts wncyi (Cyrillic,
University of Washington).
Archive file cyrams.tar.gz contains:
cmcyrmap - Computer Modern Cyrillic map file;
wncyrmap - AMS Fonts Cyrillic map file;
Makefile.cmcyr - makefile for cmcyr font files;
Makefile.amsfonts - makefile for AMS Fonts Cyrillic font files.
AMS Fonts Cyrillic map file contains mappings only for glyphs found in
KOI8-R character set, `Numero' sign used in cyrillic typography and
guillemots. These are the only characters supported by cmcyr package.
To be consistent, I adopted the following convention for font naming:
- each font name originating from cmcyr is prefixed with `C'. For
example, TR font is supplemented by CTR font, TI font is supplemented by
CTI font and so on.
- each font name originating from AMS Fonts Cyrillic preserves it's
original name, but converted to uppercase. For example, wncyr, wncyb,
wncyi, wncysc and wncyss become correspondingly WNCYR, WNCYB, WNCYI,
WNCYSC and WNCYSS.
To build font file descriptions I provide makefiles. Using them is
simple. One can modify them for his own needs.
$ make -f Makefile.amsfonts download
This will download ZIP-package, if you have no AMS Fonts, and unpack it.
$ make -f Makefile.amsfonts
This will create font files, all with WNCY* prefix.
Same for the cmcyr font:
$ make -f Makefile.cmcyr download
$ make -f Makefile.cmcyr
Then simply copy uppercase font files to font/devdvi/ directory.
To be able to use cyrillic fonts with DVI backend, I declare them as
special for a specific font using .fspecial directive:
.fspecial TR CTR
.fspecial TB CTB
for italic, however, I use AMS font wncyi, because it has letter `yo',
missed in cmcyr italic fonts:
.fspecial TI WNCYI
I guess, choosing DVI backend somehow changes hyphenation settings.
I can't imagine that. Contrary to TeX, hyphenation happens at input
time, working in a device independent way.
Knowing that, I tried to change some settings and even exclude dvi.tmac
file completely, but it brought no positive results. I attach my example
file `hyph.roff' which I run with
$ iconv -f utf8 -t koi8-r hyph.roff | preconv -e KOI8-R | \
groff -mru -Tdvi > hyph.dvi
This example works with hyphenation when I request PostScript output
$ iconv -f utf8 -t koi8-r hyph.roff | preconv -e KOI8-R | \
groff -mru -Tps > hyph.ps
Thanks in advance.
--
Grisha Sitkarev
cyrams.tar.gz
Description: GNU Zip compressed data
hyph.roff
Description: Text Data