lilypond-devel
[Top][All Lists]
Advanced

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

Re: New font installation idea


From: Mats Bengtsson
Subject: Re: New font installation idea
Date: Sat, 16 Mar 2002 00:01:06 +0100

You keep us busy upgrading Lilypond. 
Here comes a patch against 1.5.41 that implements
the font installation structure I sketched in an 
earlier email. The new structure is documented in 
Documentation/misc/filestructure. 
I haven't touched the Mandrake, Redhat, Suse or Debian
setup files.

   /Mats

Generated by (address unknown),
>From = lilypond-1.5.41, To = lilypond-1.5.41.mb1

usage 

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.5.41.mb1.diff

Patches do not contain automatically generated files 
or (urg) empty directories, 
i.e., you should rerun autoconf, configure

diff -purN ../lilypond-1.5.41/ChangeLog ./ChangeLog
--- ../lilypond-1.5.41/ChangeLog        Fri Mar 15 15:44:50 2002
+++ ./ChangeLog Fri Mar 15 23:03:02 2002
@@ -1,3 +1,22 @@
+2002-03-15  Mats Bengtsson  <address@hidden>
+
+       * buildscripts/lilypond-profile.sh: 
+
+       * mf/GNUmakefile (INSTALLATION_OUT_DIR*),
+       buildscripts/lilypond-login.sh, buildscripts/lilypond-profile.sh:
+       Implement new font installation strategy
+
+       * Documentation/misc/fontinstallation (TEXMF): Documentation of
+       the new font installation strategy.
+
+       * lilypond-mode.el (LilyPond-mode-map): Add shortcut "CTRL-c ;"
+       for comment-region.
+
+       * input/test/staff-size.ly: Simplified using StaffContainer
+
+       * mf/GNUmakefile (ALL_GEN_FILES): Actually generate the
+       lilypond.map file
+
 2002-03-15  Han-Wen Nienhuys  <address@hidden>
 
        * VERSION: 1.5.41 released
diff -purN ../lilypond-1.5.41/Documentation/misc/GNUmakefile 
./Documentation/misc/GNUmakefile
--- ../lilypond-1.5.41/Documentation/misc/GNUmakefile   Mon May 14 18:00:51 2001
+++ ./Documentation/misc/GNUmakefile    Fri Mar 15 16:06:07 2002
@@ -4,7 +4,7 @@ NAME = documentation
 
 STEPMAKE_TEMPLATES=documentation  texinfo
 
-TEXTS =AIMS $(wildcard CHANGES-*[0-9])  $(wildcard ANNOUNCE-*[0-9]) $(wildcard 
NEWS-*[0-9]) interview
+TEXTS =AIMS $(wildcard CHANGES-*[0-9])  $(wildcard ANNOUNCE-*[0-9]) $(wildcard 
NEWS-*[0-9]) interview fontinstallation
 EXTRA_DIST_FILES = $(TEXTS)
 
 include $(depth)/make/stepmake.make 
diff -purN ../lilypond-1.5.41/Documentation/misc/fontinstallation 
./Documentation/misc/fontinstallation
--- ../lilypond-1.5.41/Documentation/misc/fontinstallation      Thu Jan  1 
01:00:00 1970
+++ ./Documentation/misc/fontinstallation       Fri Mar 15 23:37:38 2002
@@ -0,0 +1,89 @@
+The font installation in LilyPond.
+
+Background
+
+This is a short overview of the installation of the Feta fonts
+in LilyPond. This structure is used by default from version 
+1.5.37.
+
+Let $DATADIR denote the Lilypond data installation directory, 
+typically /usr/local/share/lilypond/ or /usr/share/lilypond/.
+A non-default path can be specified using 'configure --prefix'
+or 'configure --datadir'.
+
+The trick used is to let $DATADIR be the root of an additional
+texmf tree, where the TeX tools can search just as it searches
+the default texmf tree of the teTeX distribution. We follow
+the official TeX Directory Structure (see `texdoc tds`). 
+
+The main advantage of putting the font files in a teTeX
+system tree is that generated font files (such as .*pk files)
+will automatically be stored in "the right place", i.e. you
+should never end up in your current working directory - something
+that was a common problem in previous Lilypond installations.
+What is then considered "the right place" in teTeX? If the user
+has write permissions in $DATADIR (for example if the installation
+is done locally in a home directory), then the generated files
+will also appear in subdirectories of $DATADIR. This means that
+you can keep several LilyPond versions installed in parallel
+as long as $DATADIR is set separately for each version and you 
+have write permissions in (at least all but one) of the installation
+directories. For ordinary installations in /usr/share/ or 
+/usr/local/share/, where the user does not have write permission, 
+the generated font files will instead appear in the directory
+specified by `kpsexpand \$VARTEXFONTS`, often /var/tmp/texfonts/
+or /var/spool/texmf/ depending on your teTeX distribution.
+
+Details
+
+The files are installed in the following subdirectories:
+
+$DATADIR/fonts/source/: all *.mf files
+$DATADIR/fonts/afm/: all *.afm files
+$DATADIR/fonts/tfm/: all *.tfm files
+$DATADIR/fonts/type1/: all *.pfa and/or *.pfb files
+$DATADIR/tex/: all *.tex files
+$DATADIR/dvips/: the lilypond.map file
+
+To make teTeX aware of the files, the directory is added
+to the list of texmf trees by setting the single variable
+$TEXMF. 
+
+In Bourne shell/bash:
+TEXMF="{$DATADIR,"`kpsexpand  \\$TEXMF`"}"
+export TEXMF
+
+In csh/tcsh:
+set noglob
+setenv TEXMF "{$DATADIR,"`kpsexpand  \$TEXMF`"}"
+unset noglob
+
+If $TEXMF was set previously, kpsexpand will use that value, 
+otherwise it is read from texmf.cnf (`kpsewhich texmf.cnf`
+tells you where to find the file). 
+
+
+Creating nice-looking PDF files
+
+If you have generated and installed the so-called Type1 versions
+of the fonts, and have Ghostscript version 6.0 or later, you can
+make PDF versions of your scores that look nice both on screen 
+and on paper. You just have to tell dvips to use the Type1 
+version of the fonts:
+
+dvips -ulilypond.map -Ppdf myscore.dvi
+ps2pdf myscore.ps
+
+If you want top quality printouts, it is recommended to stick
+to the bitmap fonts, i.e. to call dvips directly without
+any extra flags. The resulting PDF files will then unfortunately
+look fuzzy on screen.
+
+This will work well with ly2dvi output, however if you 
+use lilypond-book or write a LaTeX wrapper file yourself,
+do NOT include the line \usepackage[T1]{fontenc} since
+the Type1 text fonts included in the free TeX distributions
+only include TC encoded fonts, not T1 encoded. However,
+add \usepackage[latin1]{inputenc} if you use any non-
+anglosaxian characters. 
+
diff -purN ../lilypond-1.5.41/VERSION ./VERSION
--- ../lilypond-1.5.41/VERSION  Fri Mar 15 15:36:01 2002
+++ ./VERSION   Fri Mar 15 16:09:35 2002
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=41
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=mb1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff -purN ../lilypond-1.5.41/buildscripts/lilypond-login.sh 
./buildscripts/lilypond-login.sh
--- ../lilypond-1.5.41/buildscripts/lilypond-login.sh   Thu Mar 14 17:45:56 2002
+++ ./buildscripts/lilypond-login.sh    Fri Mar 15 16:34:40 2002
@@ -13,9 +13,9 @@
 set datadir="@datadir@"
 
 if ( $?GS_FONTPATH ) then
-       setenv GS_FONTPATH "$datadir/afm:/usr/share/lilypond/pfa:$GS_FONTPATH"
+       setenv GS_FONTPATH 
"$datadir/fonts/afm:$datadir/fonts/type1:$GS_FONTPATH"
  else
-       setenv GS_FONTPATH "$datadir/afm:/usr/share/lilypond/pfa"
+       setenv GS_FONTPATH "$datadir/fonts/afm:$datadir/fonts/type1"
  endif
  if ( $?GS_LIB ) then
        setenv GS_LIB "$datadir/ps:$GS_LIB"
@@ -29,33 +29,12 @@ if ( $?GS_FONTPATH ) then
 # bit silly. for ly2dvi, overrules compiled-in datadir...
 # setenv LILYPONDPREFIX "@datadir@"
 
-# include an empty path component for the system wide includes.
-if ($?MFINPUTS) then
-        setenv MFINPUTS "$datadir/mf:${MFINPUTS}::"
-else
-        setenv MFINPUTS "$datadir/mf::"
-endif
-if ($?TEXINPUTS) then
-        setenv TEXINPUTS "$datadir/tex:${TEXINPUTS}::"
-else
-        setenv TEXINPUTS "$datadir/tex::"
-endif
-if ($?TFMFONTS) then
-        setenv TFMFONTS "$datadir/tfm:$TFMFONTS"
-else
-        setenv TFMFONTS "$datadir/tfm:"
-endif
+# Add the installation directory to the teTeX system tree, 
+# see Documentation/misc/fontinstallation
 
-if ($?TEXPSHEADERS) then
-        setenv TFMFONTS "$datadir/pfa:$TEXPSHEADERS"
-else
-        setenv TFMFONTS "$datadir/pfa:"
-endif
-if ($?TEXCONFIG) then
-        setenv TEXCONFIG "$datadir/pfa:$TEXPSHEADERS"
-else
-        setenv TEXCONFIG "$datadir/pfa:"
-endif
+set noglob
+setenv TEXMF "{$datadir,"`kpsexpand  \$TEXMF`"}"
+unset noglob
 
 
 
diff -purN ../lilypond-1.5.41/buildscripts/lilypond-profile.sh 
./buildscripts/lilypond-profile.sh
--- ../lilypond-1.5.41/buildscripts/lilypond-profile.sh Thu Mar 14 17:34:09 2002
+++ ./buildscripts/lilypond-profile.sh  Fri Mar 15 16:37:08 2002
@@ -7,15 +7,10 @@
 # If run by hand or from you .profile, run as follows
 #   . lilypond-profile
 
-# This is a bit of a kludge.  Ideally, lilypond's tex, afm, pfa, ps
-# directories should be installed into their location in the texmf/gs
-# trees, rather than messing around with environment variables (eg,
-# see Debian or SuSE package).
-
 datadir=`echo "@datadir@" | sed 's!//!/!g'`
 
 # For direct ps output fonts
-GS_FONTPATH="$datadir/afm:$datadir/pfa:"${GS_FONTPATH:=""}
+GS_FONTPATH="$datadir/fonts/afm:$datadir/fonts/type1:"${GS_FONTPATH:=""}
 
 # For direct ps output: ps/lilyponddefs.ps
 GS_LIB="$datadir/ps:"${GS_LIB:=""}
@@ -26,20 +21,14 @@ GS_LIB="$datadir/ps:"${GS_LIB:=""}
 # versions of lilypond).
 # LILYPONDPREFIX="$datadir"
 
-# include an empty path component for the system wide includes.
-MFINPUTS="$datadir/mf:"${MFINPUTS:=":"}
-TEXINPUTS="$datadir/tex:$datadir/ps:"${TEXINPUTS:=":"}
-TFMFONTS="$datadir/tfm:"${TFMFONTS:=":"}
-TEXPSHEADERS="$datadir/pfa/:"${TEXPSHEADERS:=":"}
-TEXCONFIG="$datadir/pfa/:"${TEXCONFIG:=":"}
-
-
+# Add the installation directory to the teTeX system tree, 
+# see Documentation/misc/fontinstallation
+TEXMF="{$DATADIR,"`kpsexpand  \\$TEXMF`"}"
 
 # LILYPONDPREFIX="$datadir"
 # export LILYPONDPREFIX
 
-export MFINPUTS TEXINPUTS TFMFONTS GS_LIB GS_FONTPATH
-export TEXPSHEADERS TEXCONFIG
+export GS_LIB GS_FONTPATH TEXMF
 
        
 
diff -purN ../lilypond-1.5.41/input/test/staff-size.ly 
./input/test/staff-size.ly
--- ../lilypond-1.5.41/input/test/staff-size.ly Mon Dec 24 14:10:47 2001
+++ ./input/test/staff-size.ly  Fri Mar 15 16:06:07 2002
@@ -1,8 +1,7 @@
 \version "1.3.146"
 \score {
-  \notes \relative c' < \context Voice {
-   \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
-       #'staff-space = #(/ 16 20)
+  \notes \relative c' < \context StaffContainer = SA{
+     \property StaffContainer.StaffSymbol \set #'staff-space = #(/ 16 20)
 
        \property Staff.fontSize = #-1
        \property Voice.fontSize = #-1
@@ -13,7 +12,7 @@
        c8 d [e f g a] b c \ff
   }
 
-\context Staff = VB {  \dynamicDown c,,4 \ff c c c  }
+\context StaffContainer = SB {  \dynamicDown c,,4 \ff c c c  }
 
 >
 \paper { linewidth = -1. }
diff -purN ../lilypond-1.5.41/lilypond-mode.el ./lilypond-mode.el
--- ../lilypond-1.5.41/lilypond-mode.el Mon Feb  4 15:59:31 2002
+++ ./lilypond-mode.el  Fri Mar 15 16:06:07 2002
@@ -486,6 +486,7 @@ command."
   (define-key LilyPond-mode-map "\C-c\C-m" 'LilyPond-command-next-midi)
   (define-key LilyPond-mode-map "\C-cn" 'LilyPond-insert-tag-notes)
   (define-key LilyPond-mode-map "\C-cs" 'LilyPond-insert-tag-score)
+  (define-key LilyPond-mode-map "\C-c;" 'comment-region)
   )
 
 ;;; Menu Support
diff -purN ../lilypond-1.5.41/mf/GNUmakefile ./mf/GNUmakefile
--- ../lilypond-1.5.41/mf/GNUmakefile   Sat Mar  2 13:11:58 2002
+++ ./mf/GNUmakefile    Fri Mar 15 16:26:18 2002
@@ -35,18 +35,18 @@ TFM_FILES = $(addprefix $(outdir)/, $(FO
 ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES)
 
 #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
-INSTALLATION_DIR=$(datadir)/mf/
+INSTALLATION_DIR=$(datadir)/fonts/source
 INSTALLATION_FILES=$(MF_FILES) $(AF_FILES)
 
-INSTALLATION_OUT_SUFFIXES=1 2 3 4
+INSTALLATION_OUT_SUFFIXES=1 2 3 4 5
 
 INSTALLATION_OUT_DIR1=$(datadir)/tex
 INSTALLATION_OUT_FILES1=$(TEXTABLES)
 
-INSTALLATION_OUT_DIR2=$(datadir)/afm
+INSTALLATION_OUT_DIR2=$(datadir)/fonts/afm
 INSTALLATION_OUT_FILES2=$(AFM_FILES)
 
-INSTALLATION_OUT_DIR3=$(datadir)/tfm
+INSTALLATION_OUT_DIR3=$(datadir)/fonts/tfm
 INSTALLATION_OUT_FILES3=$(TFM_FILES)
 
 # comment this out if you don't want pfa's to be generated
@@ -55,9 +55,12 @@ INSTALLATION_OUT_FILES3=$(TFM_FILES)
 
 ifdef MAKE_PFA_FILES
 PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
-ALL_GEN_FILES += $(PFA_FILES)
-INSTALLATION_OUT_DIR4=$(datadir)/pfa
-INSTALLATION_OUT_FILES4=$(PFA_FILES) lilypond.map
+ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map
+INSTALLATION_OUT_DIR4=$(datadir)/fonts/type1
+INSTALLATION_OUT_FILES4=$(PFA_FILES)
+
+INSTALLATION_OUT_DIR5=$(datadir)/dvips/
+INSTALLATION_OUT_FILES5=$(outdir)/lilypond.map
 
 pfa: $(PFA_FILES) 
 endif

reply via email to

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