[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cyrillic

From: Gregory (Grisha) Trubetskoy
Subject: Re: Cyrillic
Date: Fri, 16 Nov 2001 01:43:22 -0500 (EST)

OK, I've succeded in having Cyrillic lyrics, here is how I did it. This
may not be the ultimately correct way to do it, but it worked for me.
Hopefully this will help someone facing the same problem.

The instructions below are for FreeBSD, on other systems I'm guessing
paths will vary, but everything should be essentially the same.

The initial problem lies (to the best of my understanding) in lilypond
making an assumption that a font "root name" as described in an FD file
matches the actual file name. TeTeX includes a cyrillic font package
called cmcyr, and, for example, a standard size 8 font in the
/usr/local/share/texmf/tex/latex/cyrillic/t2acmr.fd file is called "larm",
but there are no files on my system beginning with larm. May be I haven't
tried hard enough, but I concluded that using cmcyr fonts with lilypond is

So, I installed the pscyr package.

(On FreeBSD this amounts to:
# cd /usr/ports/russian/pscyr
# make install)

Here is what you have to do next:

Step 1 - figure out the file name.

A simple way to do it is to put together the following LaTeX file,
say, test.tex:

\documentclass[10pt, letterpaper]{article}





"XXXXXX" above need to be koi8-r encoded cyrillic characters. \texttx
should set the font to Textbook font. (this is all documented in a file
called fonts-ex.tex)

Then, do:

$ latex test.tex
$ dvitype test.dvi | grep Font
Font 16: ftxr6a---loaded at size 655360 DVI units
Font 15: faqr6a---loaded at size 655360 DVI units

>From this you can see that the file is most likely called ftxr6a, which
can be confirmed by:

$ locate ftxr6a

Step 2 - add a link to it so that lilypond can find it

# cd /usr/local/share/lilpond
# ln -s /usr/local/share/texmf/fonts/tfm/public/pscyr tfm.2

Step 3 - add it to fonts.scm

Edit /usr/local/share/lilypond/scm/fonts.scm so that somewhere (which is
apparent by looking at the file), you have:

    ((4 medium upright roman ftxr6a 17) . "ftxr6a")
    ((3 medium upright roman ftxr6a 17) . "ftxr6a")
    ((2 medium upright roman ftxr6a 12) . "ftxr6a")
    ((1 medium upright roman ftxr6a 12) . "ftxr6a")
    ((0 medium upright roman ftxr6a 10) . "ftxr6a")
    ((-1 medium upright roman ftxr6a 8) . "ftxr6a")
    ((-2 medium upright roman ftxr6a 7) . "ftxr6a" )
    ((-3 medium upright roman ftxr6a 6) . "ftxr6a" )
    ((-4 medium upright roman ftxr6a 5) . "ftxr6a" )
    ((-5 medium upright roman ftxr6a 5) . "ftxr6a" )

Step 4 - add it to your .mulatex file, in \context Lyrics:

\property Lyrics . LyricText \set #'font-name = #'farr6a

Also, make sure that at the beginning of the document you have:

I've skipped all of the details about lilypond-book, but all that is in
the documentation. Because you need the above lines, I don't you can do
this in an .ly file.


On Thu, 8 Nov 2001, Han-Wen Nienhuys wrote:

> address@hidden writes:
> >
> > In place where non-ascii characters are, I get nothing (or blanks?).
> >
> > I'm now beginning to think that this has to do with the fonts the lilypond
> > uses. I have to force it somehow to use a cyrillic font. The problem is I
> > can't figure out how to do this...
> >
> > I tried
> >
> > \property Lyrics.LyricText \set #'font-name = #'something
> >
> > ...but I don't know what "something" is supposed to be, or where to look
> > for it. "cmr" works, anything else says: "(cmcyr #f #f #f #f 0)warning:
> > couldn't find any font satisfying". "cmcyr" was just a wild guess, because
> > I see references to it in a file that also references cmr, some file
> > called /usr/local/share/texmf/dvips/config/
> >
> > I guess I really have no clue of what I'm doing ;-(
> If you're proficient in Scheme, you can hack about in scm/font.scm to
> add proper font selection code (please send the patch when you're
> finished). If not, modify the table following the definition of
> paper20-style-sheet-alist (in line 60)
> --
> Han-Wen Nienhuys   |   address@hidden    |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]