release commit
[lilypond.git] / Documentation / misc / fontinstallation
blob82320c9fe50f3e00ebe36b21f469360f8597c4bd
1 The font installation in LilyPond.
3 Background
5 This is a short overview of the installation of the Feta fonts
6 in LilyPond. This structure is used by default from version 
7 1.5.37.
9 Let $DATADIR denote the Lilypond data installation directory, 
10 typically /usr/local/share/lilypond/ or /usr/share/lilypond/.
11 A non-default path can be specified using 'configure --prefix'
12 or 'configure --datadir'.
14 The trick used is to let $DATADIR be the root of an additional
15 texmf tree, where the TeX tools can search just as it searches
16 the default texmf tree of the teTeX distribution. We follow
17 the official TeX Directory Structure (see `texdoc tds`). 
19 The main advantage of putting the font files in a teTeX
20 system tree is that generated font files (such as .*pk files)
21 will automatically be stored in "the right place", i.e. you
22 should never end up in your current working directory - something
23 that was a common problem in previous Lilypond installations.
24 What is then considered "the right place" in teTeX? If the user
25 has write permissions in $DATADIR (for example if the installation
26 is done locally in a home directory), then the generated files
27 will also appear in subdirectories of $DATADIR. This means that
28 you can keep several LilyPond versions installed in parallel
29 as long as $DATADIR is set separately for each version and you 
30 have write permissions in (at least all but one) of the installation
31 directories. For ordinary installations in /usr/share/ or 
32 /usr/local/share/, where the user does not have write permission, 
33 the generated font files will instead appear in the directory
34 specified by `kpsexpand \$VARTEXFONTS`, often /var/tmp/texfonts/
35 or /var/spool/texmf/ depending on your teTeX distribution.
37 Details
39 The files are installed in the following subdirectories:
41 $DATADIR/fonts/source/: all *.mf files
42 $DATADIR/fonts/afm/: all *.afm files
43 $DATADIR/fonts/tfm/: all *.tfm files
44 $DATADIR/fonts/type1/: all *.pfa and/or *.pfb files
45 $DATADIR/tex/: all *.tex files
46 $DATADIR/dvips/: the lilypond.map file
48 To make teTeX aware of the files, the directory is added
49 to the list of texmf trees by setting the single variable
50 $TEXMF. 
52 In Bourne shell/bash:
53 TEXMF="{$DATADIR,"`kpsexpand  \\$TEXMF`"}"
54 export TEXMF
56 In csh/tcsh:
57 set noglob
58 setenv TEXMF "{$DATADIR,"`kpsexpand  \$TEXMF`"}"
59 unset noglob
61 If $TEXMF was set previously, kpsexpand will use that value, 
62 otherwise it is read from texmf.cnf (`kpsewhich texmf.cnf`
63 tells you where to find the file). 
66 Creating nice-looking PDF files
68 If you have generated and installed the so-called Type1 versions
69 of the fonts, and have Ghostscript version 6.0 or later, you can
70 make PDF versions of your scores that look nice both on screen 
71 and on paper. You just have to tell dvips to use the Type1 
72 version of the fonts:
74 dvips -ulilypond.map -Ppdf myscore.dvi
75 ps2pdf myscore.ps
77 If you want top quality printouts, it is recommended to stick
78 to the bitmap fonts, i.e. to call dvips directly without
79 any extra flags. The resulting PDF files will then unfortunately
80 look fuzzy on screen.
82 This will work well with ly2dvi output, however if you 
83 use lilypond-book or write a LaTeX wrapper file yourself,
84 do NOT include the line \usepackage[T1]{fontenc} since
85 the Type1 text fonts included in the free TeX distributions
86 only include TC encoded fonts, not T1 encoded. However,
87 add \usepackage[latin1]{inputenc} if you use any non-
88 anglosaxian characters.