From ba201783bd4167640719c7b6713ac9d284a354da Mon Sep 17 00:00:00 2001 From: Mats Bengtsson Date: Sat, 16 Mar 2002 00:01:06 +0100 Subject: [PATCH] patch::: 1.5.41.mb1: Re: New font installation idea 2002-03-15 Mats Bengtsson * 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 --- ChangeLog | 19 ++++++ Documentation/misc/GNUmakefile | 2 +- Documentation/misc/fontinstallation | 89 +++++++++++++++++++++++++++++ VERSION | 2 +- buildscripts/lilypond-login.sh | 37 +++--------- buildscripts/lilypond-profile.sh | 21 ++----- input/test/staff-size.ly | 7 +-- lilypond-mode.el | 1 + mf/GNUmakefile | 17 +++--- 9 files changed, 137 insertions(+), 58 deletions(-) create mode 100644 Documentation/misc/fontinstallation diff --git a/ChangeLog b/ChangeLog index 5154a27c0a..65cb32d322 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2002-03-15 Mats Bengtsson + + * 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 * VERSION: 1.5.41 released diff --git a/Documentation/misc/GNUmakefile b/Documentation/misc/GNUmakefile index 183762facc..a15216cd98 100644 --- a/Documentation/misc/GNUmakefile +++ b/Documentation/misc/GNUmakefile @@ -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 --git a/Documentation/misc/fontinstallation b/Documentation/misc/fontinstallation new file mode 100644 index 0000000000..82320c9fe5 --- /dev/null +++ b/Documentation/misc/fontinstallation @@ -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 --git a/VERSION b/VERSION index fc9b623800..8aa52a92e8 100644 --- a/VERSION +++ b/VERSION @@ -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 --git a/buildscripts/lilypond-login.sh b/buildscripts/lilypond-login.sh index 4918a319bb..67a8f34671 100755 --- a/buildscripts/lilypond-login.sh +++ b/buildscripts/lilypond-login.sh @@ -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 - -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 +# Add the installation directory to the teTeX system tree, +# see Documentation/misc/fontinstallation + +set noglob +setenv TEXMF "{$datadir,"`kpsexpand \$TEXMF`"}" +unset noglob diff --git a/buildscripts/lilypond-profile.sh b/buildscripts/lilypond-profile.sh index ef963d8a14..8539cd36d6 100755 --- a/buildscripts/lilypond-profile.sh +++ b/buildscripts/lilypond-profile.sh @@ -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 --git a/input/test/staff-size.ly b/input/test/staff-size.ly index 3dbe63ee08..8d571a6df2 100644 --- a/input/test/staff-size.ly +++ b/input/test/staff-size.ly @@ -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 --git a/lilypond-mode.el b/lilypond-mode.el index 23696508ee..76eb43e1d5 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -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 --git a/mf/GNUmakefile b/mf/GNUmakefile index 22eb45ecd0..39dddbf36c 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -35,18 +35,18 @@ TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm)) 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 -- 2.39.2