[Top][All Lists]

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

New font installation idea

From: Mats Bengtsson
Subject: New font installation idea
Date: Mon, 04 Mar 2002 23:31:23 +0100

I'd like to suggest a new method to install the
Lilypond font related files. The solution is simply
to follow the TeX directory structure (texdoc tds) and 
set a single environment variable to link the whole 
directory structure to the other texmf trees. This will 
solve the problems with generated feta files in the 
working directories and reduce the number of 
environment variable settings. Also, it makes it easier 
to keep several parallel Lilypond installations on the 
same machine.

The principle is simple; in the Lilypond data installation
directory (e.g. /usr/local/share/lilypond/) use the 
following subdirectories:

fonts/type1/*.pf{ab} (for Type1 font support)
dvips/   (for Type1 font support)

Then, add the directory to the $TEXMF environment variable,
in sh/bash:
  TEXMF="{$datadir,"`kpsexpand  \\$TEXMF`"}"
in csh/tcsh:
  set noglob
  setenv TEXMF "{$datadir,"`kpsexpand \$TEXMF`"}"
  unset noglob

Note that this setting will work both if $TEXMF is
set previously or if the value is read from the 
teTeX configuration file.

With this setup, PDF-files with type1 fonts is simple:
dvips -Ppdf file.dvi
It'd also be easy to make a config.lily file so you could
dvips -Ppdf -Plily file.dvi
or overriding the default config.pdf file with a 
new one so it suffices to say
dvips -Ppdf
(the problem is to stay otherwise compatible with the 
config.pdf files in different teTeX versions. 

If the user has write permissions in the installation 
directory, the .*pk files will be generated in fonts/pk/
otherwise they will be generated in `kpsexpand \$VARTEXFONTS`.
Thus, if you want to try a newer Lilypond version on a machine
without destroying the generated font files of an existing
installation, just install the new version somewhere in your
home directory.

For us who are used to run from the build directory directly, 
I'd recommend setting up a directory somewhere with links to 
the build directory, following the structure above. I guess
we don't want to restructure the source code tree according
to the TDS.

In the ly2dvi script, the current variable settings "just to 
be sure" actually destroy more than they solve. Even if you
have followed my old advice of linking the .mf files somewhere
below texmf.local, the settings of MFINPUTS in ly2dvi will
prevent LaTeX from finding the files the "right way" and 
therefore .tfm and .*pk files will be generated in the 
working directory. Since the working directory is a 
temporary directory, the generated files are deleted
at the end of the script and unless you run with -v, 
you only notice that LaTeX takes very long time every
run. If you don't notice the delay, it's probably since
you have run pure Lilypond + TeX without ly2dvi which 
generates .tfm and .*pk files in $VARTEXFONTS where 
they can be found later by ly2dvi.
Also, the settings don't solve the problem for 
people with broken installations, they just delay the
discovery of the problems, since lilypond-book+LaTeX
won't work unless the installation is correct anyway.
I suggest that we remove these lines in ly2dvi, but on the
other hand if we follow the new file structure and variable 
settings described above, an additional setting in ly2dvi 
will not make any harm.

What do you say, should I make a try to implement this
in a patch?


reply via email to

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