]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 30 Dec 2005 01:56:57 +0000 (01:56 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 30 Dec 2005 01:56:57 +0000 (01:56 +0000)
.cvsignore
ChangeLog
lily/font-config.cc
lily/main.cc
lily/relocate.cc
ly/engraver-init.ly
ly/property-init.ly
scm/auto-beam.scm
scm/define-grobs.scm
scm/define-music-display-methods.scm
scm/define-music-types.scm

index 363bf404ee553120ce61aac3cc425d4deacbe20c..bb83430d3a8f5d8847adaddaf349d4a7ec5be392 100644 (file)
 *~
 .gdbinit
 .htaccess
+.lineno
+1000.scsm
 GNUmakefile
+System
+ab
 aclocal.m4
+add
+aly
+arial.pfa
 autom4te.cache
+ay
+ay.tar.gz
+aybabtu.afm
+b
+bench.sh
+bla
+bla.lytex
+builddir.make
+c.afm
+c.pfb
+calls
+cf2.zip
+cffpats
+conf32255.sh
+config-g16.hh
 config-g16.make
+config-g164.hh
+config-g164.make
+config-g16nothread.hh
+config-g16nothread.make
+config-g16opt.hh
 config-g16opt.make
+config-opt.hh
 config-opt.make
+config-optsize.hh
+config-optsize.make
+config-prof.hh
 config-prof.make
+config-speed.hh
+config-speed.make
 config.hh
 config.make
 config.status
+configure
+cont
+cp.out
+crashes
 custom.py
+d
+dif
+example-1.texstr
+exp.scm
+f.texstr
+f.textmetrics
+fcc.c
+fi.py
+fingpats
+firefox.icns
+fondu3FB3-2
+fondu_src-050825.tgz
+fontconfig
+fontconfig.c
+foo.c
+foo.make
+glob
+grob-array-pats
+gsbug-inv
+gspatch
+gstest
+hello
+hello.utf
+htpasswd
 install-sh
+invstrength
+les-nereides.dsc
+les-nereides.texstr
+les-nereides.textmetrics
+lib
+lilymydear.zip
+lilypond-2.6.0-2.7.0.diff
+lilypond-internals.texi
+lilypond-tools.zip
+log
+lppats
+lute_archives
+m
+makefile.pango
+makelily.py
+mehl
+mingw
+morgenlied.lpm
+morgenlied.texstr
+munix
+mxlpats
+ncsb-ttf
+ncsb-ttf.tar.gz
+notitle.zip
+o2
+ok
+optpars.py
+optparse.py
+optparse.pyc
+os
+otftest.c
 out
 out-g16
+out-g164
+out-g16nothread
 out-g16opt
 out-opt
+out-optsize
 out-prof
+out-speed
 out-www
+out.ai
+out.pfa
+out.sk
+out.spsc
+p
+p2
+pango
+pango.c
 patch
+patent
 pats
+pic
+pl.afm
+polyprof
+quotpats
+re
+s
+s.py
 scons.cache
+setup.ini
+sf.ai
+sgz
 share
+sib.py
+simple-song.twy
+socket-output
+stat
+string
+sys
+t
+t.gz
+t2.c
+talk.py
+test.py
+test.scm
+timtekst
+ud
+uninstalldirs
+update-rhsources.sh
+us
+usr
+ver
+webdif
+wrap.scm
+wtk-prof
+wtk-prof2
+wtk1-fugue2.scm
index 8cc4287df15b0e6ece5a83ebd7b24aca8679d878..a3859217cd4832f2a8909134a03ffa331d1e8668 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-12-30  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/*.scm: use LEFT/RIGHT/UP/DOWN etc. iso. magical numbers.
+
+2005-12-29  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/font-config.cc (init_fontconfig): print warning if cache
+       file is not existant.
+
+       * lily/main.cc: don't use #ifdef but #if
+
 2005-12-28  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/grob-property.cc (internal_set_property): don't abort on
index b1f08466f3a7cbe2e35a9f427458f96b5bb528b5..679bb67e7940d8a6d50ac013aa4b72498bdafc5c 100644 (file)
 
 #include <fontconfig/fontconfig.h>
 #include <sys/stat.h>
+
 #include "file-path.hh"
 #include "main.hh"
 #include "warn.hh"
 
+
 FcConfig *font_config_global = 0;
 
 void
@@ -24,10 +26,19 @@ init_fontconfig ()
   if (be_verbose_global)
     message (_ ("Initializing FontConfig..."));
 
-  if (!FcInit ())
-    error (_ ("initializing FontConfig failed"));
+  font_config_global = FcInitLoadConfig ();
+  FcChar8 *cache_file = FcConfigGetCache (font_config_global);
 
-  font_config_global = FcConfigGetCurrent ();
+  /*
+    This is a terrible kludge, but there is apparently no way for
+    FontConfig to signal whether it needs to rescan directories.
+   */ 
+  if (!is_file ((char*)cache_file))
+    message (_ ("Rebuilding FontConfig cache; this may take a while..."));
+                       
+  FcConfigBuildFonts (font_config_global);
+  FcConfigSetCurrent (font_config_global);
+  
   Array<String> dirs;
 
   dirs.push (prefix_directory + "/fonts/otf/");
@@ -42,8 +53,18 @@ init_fontconfig ()
        message (_f ("adding font directory: %s", dir.to_str0 ()));
     }
 
+  font_config_global = FcConfigGetCurrent ();
+  
   if (be_verbose_global)
     progress_indication ("\n");
+
+  if (!is_file ((char*)cache_file))
+    {
+      /* inhibit future messages. */
+      FILE *f = fopen ((char*)cache_file, "w");
+      fclose (f);
+    }
+  
 }
 
 #else
index f97f00a287eb104af78cb8efa21c13c4d4310612..a6756fc3cea3459d2272f1d2231769a8bb955e81 100644 (file)
@@ -87,7 +87,7 @@ bool make_print = true;
 
 
 bool relocate_binary =
-#ifdef ARGV0_RELOCATION
+#if ARGV0_RELOCATION
   true;
 #else
   false
index d8efda1a41d3115efc4c5384d56f1f85109a636a..0ca4762eadba58a710afc0b8bfe6efccda495e09 100644 (file)
@@ -113,6 +113,7 @@ set_relocation (String bindir, String prefix)
     bindtextdomain ("lilypond", localedir.to_str0 ());
 #endif
 
+  
   set_env_file ("FONTCONFIG_FILE", sysconfdir + "/fonts/fonts.conf");
 #ifdef __MINGW32__
   char font_dir[PATH_MAX];
@@ -138,7 +139,8 @@ set_relocation (String bindir, String prefix)
   set_env_file ("PANGO_RC_FILE", sysconfdir + "/pango/pangorc");
 
   set_env_dir ("PANGO_PREFIX", prefix);
-               
+  set_env_dir ("FONTCONFIG_PATH", sysconfdir + "/fonts");
+  
   prepend_env_path ("PATH", bindir);
 }
 
index b945c759ccc8cf1ac365c16f860f59ef2947c420..1f8aca50b509fa78e19c1310fdac16a333ba14aa 100644 (file)
@@ -560,7 +560,7 @@ AncientRemoveEmptyStaffContext = \context {
   figuredBassFormatter = #format-bass-figure
   metronomeMarkFormatter = #format-metronome-markup
   graceSettings = #`(
-    (Voice Stem direction 1)
+    (Voice Stem direction ,UP)
     (Voice Stem font-size -3)
     (Voice NoteHead font-size -3)
     (Voice Dots font-size -3)
@@ -569,7 +569,7 @@ AncientRemoveEmptyStaffContext = \context {
     (Voice Beam thickness 0.384)
     (Voice Beam length-fraction 0.8)
     (Voice Accidental font-size -4)
-    (Voice Slur direction -1)
+    (Voice Slur direction ,DOWN)
   )
 
   keepAliveInterfaces = #'(rhythmic-grob-interface lyric-interface percent-repeat-interface)
index e8bdb855d91dff2ad243248bb9af8dc40d604731..18e3386511db9447953816443a53c69dc8644653 100644 (file)
@@ -90,7 +90,7 @@ tupletNeutral = \revert TupletBracket #'direction
 cadenzaOn = \set Timing.timing = ##f
 cadenzaOff = {
   \set Timing.timing = ##t
-  \set Timing.measurePosition = #(ly:make-moment 0 1)
+  \set Timing.measurePosition = #ZERO-MOMENT
 }
 
 % dynamic ly:dir?  text script, articulation script ly:dir?    
index d11fb318c3dd56192062c3b72ec05a59101cce8b..074494c2ba8d28d71d41afa46e46f184888b28fd 100644 (file)
@@ -196,7 +196,7 @@ a fresh copy of the list-head is made."
       #f
       (let* ((beat-length (get 'beatLength (ly:make-moment 1 1)))
             (measure-length (get 'measureLength (ly:make-moment 1 1)))
-            (measure-pos (get 'measurePosition (ly:make-moment 0 1)))
+            (measure-pos (get 'measurePosition ZERO-MOMENT))
             (settings (get 'autoBeamSettings '()))
             (function (list (if (= dir START) 'begin 'end)))
             (num-mom (ly:moment-div measure-length beat-length))
index fbf6239b8bf3a928d03283283409e2ae8da26ced..3970b861a25fbc2a1139864bf9353e6732fadf6e 100644 (file)
        (font-family . music)
        (padding . 0.5)
        (X-offset . ,Side_position_interface::x_aligned_side)
-       (direction . -1)
+       (direction . ,LEFT)
        (cautionary-style . parentheses)
 
        (stencil . ,Accidental_interface::print)
        (stencil . ,Arpeggio::print)
        (Y-offset . ,Staff_symbol_referencer::callback)
        (X-offset . ,Side_position_interface::x_aligned_side)
-       (direction . -1)
+       (direction . ,LEFT)
        (padding . 0.5)
        (side-axis . ,X)
        (staff-position . 0.0)
        (breakable . #t)
        (break-visibility . ,begin-of-line-visible)
        (padding . 1.0)
-       (direction . 1)
+       (direction . ,UP)
        (font-family . roman)
        (font-size . -2)
        (Y-offset . ,Side_position_interface::y_aligned_side)
 
        ;; TODO: should be in SLT.
        (thickness . 0.48) ; in staff-space
-       (neutral-direction . -1)
+       (neutral-direction . ,DOWN)
 
        ;; Whe have some unreferenced problems here.
        ;;
        (no-spacing-rods . #t)
        (Y-offset . ,Side_position_interface::y_aligned_side)
        (X-offset . ,Self_alignment_interface::x_aligned_on_self)
-       (direction . 1)
+       (direction . ,UP)
        (padding . 0.5)
        (staff-padding . 0.5)
        (script-priority . 200)
 
        (break-visibility . ,end-of-line-visible)
        (style . vaticana)
-       (neutral-direction . -1)
+       (neutral-direction . ,DOWN)
        (Y-offset . ,Staff_symbol_referencer::callback)
        (space-alist . (
                        (first-note . (minimum-fixed-space . 0.0))
        (font-encoding . fetaNumber)
        (self-alignment-X . 0)
        (font-size . -2) 
-       (direction . 1)
+       (direction . ,UP)
        (padding . 0.2)
        (staff-padding . 0.25)
        (side-axis . ,Y)
        (avoid-slur . outside)
        (slur-padding . 0.3)
        (minimum-space . 1.2)
-       (direction . -1)
+       (direction . ,DOWN)
        (side-axis . ,Y)
 
        (Y-extent . ,Axis_group_interface::height)
        (Y-offset . ,Side_position_interface::y_aligned_side)
        (padding . 0.2)
        (staff-padding . 0.2)
-       (direction . -1)
+       (direction . ,DOWN)
        (side-axis . ,Y)
        (bracket-flare . (0.5 . 0.5))
        (meta . ((class . Spanner)
        
        ;; This direction is for aligned_on_support_refpoints
        ;; (?) --hwn
-       (direction . 0)
+       (direction . ,CENTER)
        (space-alist . (
                        (left-edge . (extra-space . 1.0))))
 
        (thickness . 1.6)
        (edge-height . (0.7 . 0.7))
        (shorten-pair . (-0.2 . -0.2))
-       (direction . 1)
+       (direction . ,UP)
        (positions . ,Tuplet_bracket::calc_positions)
        (stencil . ,Tuplet_bracket::print)
        
        (stencil . ,Measure_grouping::print)
 
        (padding . 2)
-       (direction . 1)
+       (direction . ,UP)
        (thickness . 1)
        (height . 2.0)
        (staff-padding . 3)
        (stencil . ,Text_interface::print)
 
        (Y-offset . ,Side_position_interface::y_aligned_side)
-       (direction . 1)
+       (direction . ,UP)
        (padding . 0.8)
        (side-axis . ,Y)
        (meta . ((class . Item)
        (side-axis . ,Y)
 
        (self-alignment-X . 0)
-       (direction . 1)
+       (direction . ,UP)
        (padding . 0.4)
        (staff-padding . 0.4)
        (font-encoding . fetaNumber)
        
        (Y-offset . ,Side_position_interface::y_aligned_side)
        (self-alignment-X . 0)
-       (direction . 1)
+       (direction . ,UP)
        (padding . 0.2)
        (staff-padding . 0.25)
        (meta . ((class . Spanner)
        (minimum-length . 1.0)
        (dash-fraction . 0.3)
        (edge-height . (0 . 1.2))
-       (direction . 1)
+       (direction . ,UP)
        (meta . ((class . Spanner)
                 (interfaces . (ottava-bracket-interface
                                horizontal-bracket-interface
                           ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
        (Y-offset . ,Side_position_interface::y_aligned_side)
        (self-alignment-X . 0)
-       (direction . 1)
+       (direction . ,UP)
        (padding . 0.2)
        (staff-padding . 0.25)
        (font-size . -2) 
 
        (style . line)
        (bound-padding . 1.0)
-       (direction . -1)
+       (direction . ,DOWN)
        (bracket-flare . (0.5 . 0.5))
        (edge-height . (1.0 . 1.0))
        (shorten-pair . (0.0 . 0.0))
                      ))
        (Y-offset . ,Side_position_interface::y_aligned_side)
        (self-alignment-X . 0)
-       (direction . 1)
+       (direction . ,UP)
        (breakable . #t)
        (font-size . 2)
        (baseline-skip . 2)
 
        (stencil . ,Text_interface::print)
 
-       (direction . 1)
+       (direction . ,RIGHT)
        (X-offset . ,Self_alignment_interface::x_aligned_on_self)
        (no-spacing-rods . #t)
        (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
 
        (padding . 1.2)
        (minimum-space . 1.0)
-       (direction . -1)
+       (direction . ,DOWN)
        (meta . ((class . Spanner)
                 (interfaces . (piano-pedal-interface
                                axis-group-interface
 
 
        ;; default stem direction for note on middle line
-       (neutral-direction . -1)
+       (neutral-direction . ,DOWN)
 
        ;; We use the normal minima as minimum for the ideal lengths,
        ;; and the extreme minima as abolute minimum length.
        (no-spacing-rods . #t)
        (stencil . ,Sustain_pedal::print)
        (self-alignment-X . 0)
-       (direction . 1)
+       (direction . ,RIGHT)
        (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
        (X-offset . ,Self_alignment_interface::x_aligned_on_self)
        (meta . ((class . Item)
        (padding . 1.2)
        (staff-padding . 1.2)
        (minimum-space . 1.0)
-       (direction . -1)
+       (direction . ,DOWN)
        (meta . ((class . Spanner)
                 (interfaces . (piano-pedal-interface
                                axis-group-interface
      . (
        (no-spacing-rods . #t)
        (X-offset . ,Self_alignment_interface::x_aligned_on_self)
-       (direction . -1)
+       (direction . ,DOWN)
 
        ;; sync with Fingering ?
        (padding . 0.5)
        (dash-fraction . 0.2)
        (dash-period . 3.0)
        (side-axis . ,Y)
-       (direction . 1)
+       (direction . ,UP)
        (meta . ((class . Spanner)
                 (interfaces . (text-spanner-interface
                                side-position-interface
        (style . trill)
        (staff-padding . 1.0)
        (padding . 0.5)
-       (direction . 1)
+       (direction . ,UP)
        (Y-offset . ,Side_position_interface::y_aligned_side)
        (side-axis . ,Y)
        (meta . ((class . Spanner)
        (font-shape . italic)
        (no-spacing-rods . #t)
        (self-alignment-X . 0)
-       (direction . 1)
+       (direction . ,RIGHT)
        (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
        (X-offset . ,Self_alignment_interface::x_aligned_on_self)
        (meta . ((class . Item)
        (padding . 1.2)
        (staff-padding . 1.2)
        (minimum-space . 1.0)
-       (direction . -1)
+       (direction . ,DOWN)
        (meta . ((class . Spanner)
                 (interfaces . (piano-pedal-interface
                                axis-group-interface
      . (
        (breakable . #t)
        (Y-offset . ,Side_position_interface::y_aligned_on_support_refpoints)
-       (direction . 0)
+       (direction . ,CENTER)
        (space-alist . ((left-edge . (extra-space . 1.0))))
        (break-align-symbol . instrument-name)
        (stencil . ,Text_interface::print)
index 72ebbe9445ec4c80e9729ec02da1499e99b1e0c4..202a56c53f4c929900281223c4461cb0c3fe961d 100644 (file)
 
 (define* (event-direction->lily-string event #:optional (required #t))
   (let ((direction (ly:music-property event 'direction)))
-    (cond ((or (not direction) (null? direction) (= 0 direction))
+    (cond ((or (not direction) (null? direction) (= CENTER direction))
           (if required "-" ""))
-         ((= 1 direction) "^")
-         ((= -1 direction) "_")
+         ((= UP direction) "^")
+         ((= DOWN direction) "_")
          (else ""))))
 
 (define-macro (define-post-event-display-method type vars direction-required str)
   `(define-display-method ,type ,vars
      (format #f "~a~a"
             (event-direction->lily-string ,(car vars) ,direction-required)
-            (if (= -1 (ly:music-property ,(car vars) 'span-direction))
+            (if (= START (ly:music-property ,(car vars) 'span-direction))
                 ,str-start
                 ,str-stop))))
 
                                                          duration (ly:make-duration 0 0 0 1))
                                                         (music
                                                          'SlurEvent
-                                                         span-direction -1))))))
+                                                         span-direction START))))))
                           #t)
          (with-music-match (?stop (music 
                                    'SequentialMusic
                                                          duration (ly:make-duration 0 0 0 1))
                                                         (music
                                                          'SlurEvent
-                                                         span-direction 1))))))
+                                                         span-direction STOP))))))
            (format #f "\\appoggiatura ~a" (music->lily-string ?music))))))
 
 
                                                          duration (ly:make-duration 0 0 0 1))
                                                         (music
                                                          'SlurEvent
-                                                         span-direction -1)))
+                                                         span-direction START)))
                                              (music
                                               'ContextSpeccedMusic
                                               element (music
                                                         duration (ly:make-duration 0 0 0 1))
                                                        (music
                                                         'SlurEvent
-                                                        span-direction 1))))))
+                                                        span-direction STOP))))))
           (format #f "\\acciaccatura ~a" (music->lily-string ?music))))))
 
 (define-extra-display-method GraceMusic (expr)
@@ -578,7 +578,7 @@ Otherwise, return #f."
   "\\\\")
 
 (define-display-method LigatureEvent (ligature)
-  (if (= -1 (ly:music-property ligature 'span-direction))
+  (if (= START (ly:music-property ligature 'span-direction))
       "\\["
       "\\]"))
 
index 383d42b4a9229efdd4d4c97658664546ca3fdff9..e5272032ff82da84fed928884e8f14e725afe9f7 100644 (file)
@@ -192,7 +192,7 @@ Syntax: @var{note}\\cr
      . (
        (description .  "Interpret the argument as grace notes. ")
        (start-callback . ,Grace_music::start_callback)
-       (length . ,(ly:make-moment 0 1))
+       (length . ,ZERO-MOMENT)
        (iterator-ctor . ,Grace_iterator::constructor)
        (types . (grace-music music-wrapper-music general-music))
        ))
@@ -253,7 +253,7 @@ Syntax @var{\\oldaddlyrics }@var{music} @var{lyrics}.")
        (description .  "Align lyrics to the start of notes.
 
 Syntax @var{\\lyricsto }@var{voicename} @var{lyrics}.")
-       (length . ,(ly:make-moment 0 1))
+       (length . ,ZERO-MOMENT)
        (types . (general-music lyric-combine-music))
        (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
        ))