]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/span-dynamic-performer.cc (process_music): remove spurious
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Mar 2004 16:03:55 +0000 (16:03 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Mar 2004 16:03:55 +0000 (16:03 +0000)
warning.

* scm/new-font.scm (make-font-tree): new function.

ChangeLog
Documentation/user/changing-defaults.itely
input/regression/chord-name-entry.ly
lily/dynamic-engraver.cc
lily/include/audio-item.hh
lily/span-dynamic-performer.cc
scm/define-grobs.scm
scm/new-font.scm

index 9f4272908e49cd3650ce12600acd1fea09189653..f2325a9733ea172dce680af58b7f066d1ff44cd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,15 @@
 2004-03-14  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/span-dynamic-performer.cc (process_music): remove spurious
+       warning.
+
        * lily/context-def.cc (Context_def): init name to ""
 
        * lily/font-interface.cc: add font-encoding property.
 
        * scm/lily.scm (chain-assoc-get): bugfix.
 
-       * lily/paper-book.cc (stencil2line): don't make static SCMs to
-       
+       * lily/paper-book.cc (stencil2line): protect static SCM.
 
        * lily/font-interface.cc (text_font_alist_chain): rename function,
        and use text-font-defaults. 
index 439af71b3787f5db86726b2351a61c296d332014..dfb168d04f0c58234539d17ae853d08115328940 100644 (file)
@@ -625,16 +625,22 @@ all three mechanisms work for every object that supports
 
 
 @itemize @bullet
+@item @code{font-encoding}
+is a symbol that sets layout of the glyphs. Choices include
+@code{text} for normal text, @code{braces} (for piano staff braces),
+@code{music} (the standard music font, including ancient glyphs),
+@code{dynamic} (for dynamic signs) and @code{number} for the number
+font.
+
+
 @item @code{font-family}
  is a symbol indicating the general class of the typeface.  Supported are
-@code{roman} (Computer Modern), @code{braces} (for piano staff
-braces), @code{music} (the standard music font, including ancient
-glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
+@code{roman} (Computer Modern), @code{sans} and @code{typewriter}
   
 @item @code{font-shape}
-  is a symbol indicating the shape of the font, there are typically several
-  font shapes available for each font family. Choices are @code{italic},
-  @code{caps} and @code{upright}.
+  is a symbol indicating the shape of the font, there are typically
+several font shapes available for each font family. Choices are
+@code{italic}, @code{caps} and @code{upright}.
 
 @item @code{font-series}
 is a  symbol indicating the series of the font. There are typically several
index 407a1f96e02e2b7d36a9a16ad68127c0dee4a839..fb22a3790a6d98499a060b8013f6081efa0e70a1 100644 (file)
@@ -34,8 +34,8 @@ c:9_":9"
 c:11_":11"
 c:13_":13"
 c:m13_":m13"
-c:7^5_":7\\^{ }5"
-c^3_"\\^{ }3"
+c:7^5_":7\\^{~}5"
+c^3_"\\^{~}3"
 c/g_"/g"
 c/gis_"/gis"
 c/a_"/a"
index bb7e3a6cb5e5247bbf4f91ca0ee9ac6c33248555..a5b5de7de89149e956c6a3bb1e65973fdaf17609 100644 (file)
@@ -178,7 +178,7 @@ Dynamic_engraver::process_music ()
          cresc_ = 0;
          current_cresc_ev_ = 0;
        }
-      else if (accepted_spanreqs_drul_[STOP] )
+      else if (accepted_spanreqs_drul_[STOP])
        {
          accepted_spanreqs_drul_[STOP]->origin ()->warning (_ ("can't find start of (de)crescendo"));
          stop_ev = 0;
index 312f2fbe40e06ad33b405d954c912b2ae8b80b4b..cde3d8ad3d3f8b83cca163e4173de79ba97f1dac 100644 (file)
@@ -25,9 +25,7 @@ class Audio_item : public Audio_element
 {
 public:
   Audio_item ();
-
   Audio_column* audio_column_;
-
   
 private:
   Audio_item (Audio_item const&);
index caea219c3852fec827dc3dc996590dc960bf9e12..edd25919edb27f796d349d2a2993208f45e2f243 100644 (file)
@@ -106,7 +106,6 @@ Span_dynamic_performer::process_music ()
       dynamic_tuples_.push (a);
     }
 
-
   if (span_events_[STOP])
     { 
       finished_dynamic_tuples_.top ().audio_->volume_ = last_volume_;
@@ -116,7 +115,7 @@ Span_dynamic_performer::process_music ()
     {
       dynamic_tuples_[0].audio_->volume_ = last_volume_;
     }
-  span_start_event_ = 0;
+
   span_events_[START] = 0;
   span_events_[STOP] = 0;
 }
index 3cc58925029a154d0ea867eb718f1318d88cf155..3a5941375368caaf2909f46cc6af584d7c0b349b 100644 (file)
                          (print-function . ,Percent_repeat_item_interface::double_percent)
                          (breakable . #t)
                          (slope . 1.0)
-                         (font-family . music)
+                         (font-encoding . music)
                          (width . 2.0)
                          (thickness . 0.48)
                          (break-align-symbol . staff-bar)
        (no-spacing-rods . #t)
        (script-priority . 100)
        (font-series . bold)
-       (font-family . dynamic)
+       (font-encoding . dynamic)
        (font-shape . italic)
        (self-alignment-Y . 0)
        (meta . ((interfaces . (font-interface text-interface self-alignment-interface  dynamic-interface script-interface item-interface))))
        (self-alignment-X . 0)
        (self-alignment-Y . 0)
        (script-priority . 100)
-       (font-family . number)
+       (font-encoding . number)
        (font-size . -5)                ; don't overlap when next to heads.
        (font-shape . upright)
        (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface item-interface ))))
        ))
 
-
-    (RemoveEmptyVerticalGroup
+    (Glissando
      . (
-       (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
-       (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
-       (remove-first . #t)
-       (axes . (1))
-       (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface  spanner-interface))))
+       (style . line)
+       (gap . 0.5)
+       (zigzag-width . 0.75)
+       (breakable . #t)
+       (X-extent-callback . #f)
+       (Y-extent-callback . #f)                         
+       (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
+       (print-function . ,Line_spanner::print)
+       (meta . ((interfaces . (line-spanner-interface spanner-interface))))
        ))
 
     (Hairpin
        (break-align-symbol . instrument-name)
        (break-visibility . ,begin-of-line-visible)
        (baseline-skip . 2)
-       (font-family . roman)
        (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
        ))
     
        (break-align-symbol . clef)
        (break-visibility . ,begin-of-line-visible)
        (baseline-skip . 2)
-       (font-family . roman)
        (meta . ((interfaces . (font-interface
                                self-alignment-interface
                                side-position-interface text-interface
        (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
        (self-alignment-X . 0)
        (word-space . 0.6)
-       (font-family . roman)
        (font-series . bold-narrow)
-       (font-shape . upright)
        (font-size . 1.0)
        (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
        ))
        (direction . 1)
        (breakable . #t)
        (font-size . 2)
-       (font-family . roman)
        (baseline-skip . 2)
        (break-visibility . ,end-of-line-invisible)
        (padding . 0.8)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
        (direction . 1)
        (breakable . #t)
-       (font-family . roman)
        (break-visibility . ,end-of-line-invisible)
        (padding . 0.8)
        (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
        (direction . 1)
        (padding . 1.3)
        (staff-padding . 1.3)
-       (font-family . number)
+       (font-encoding . number)
        (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
        ))
     (MultiMeasureRestText
        (direction . 1)
        (padding . 1.5)
        (staff-padding . 1.5)
-       (font-family . roman)
        (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
        ))
  (NoteCollision
        (meta . ((interfaces . (rhythmic-grob-interface rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
        ))
 
-    (Glissando
+    (NoteSpacing
      . (
-       (style . line)
-       (gap . 0.5)
-       (zigzag-width . 0.75)
-       (breakable . #t)
-       (X-extent-callback . #f)
-       (Y-extent-callback . #f)                         
-       (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
-       (print-function . ,Line_spanner::print)
-       (meta . ((interfaces . (line-spanner-interface spanner-interface))))
+       (stem-spacing-correction . 0.5)
+
+       ;; Changed this from 0.75.
+       ;; If you ever change this back, please document! --hwn
+       (knee-spacing-correction . 1.0)
+       
+       (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
        ))
 
     (VoiceFollower
     (NoteName
      . (
        (print-function . ,Text_item::print)
-       (font-family . roman)
        (meta . ((interfaces . (note-name-interface
                                text-interface font-interface item-interface ))))
        ))
        (padding . 0.4)
        (staff-padding . 0.2)
        (font-size . -4)
-       (font-family . roman)
        (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
        ))
 
        (print-function . ,Multi_measure_rest::percent)
        (slope . 1.0)
        (thickness . 0.48)
-       (font-family . music)
+       (font-encoding . music)
        (meta . ((interfaces . (multi-measure-rest-interface  spanner-interface font-interface percent-repeat-interface))))
        ))
 
     (PianoPedalBracket   ;; an example of a text spanner
      . (
        (print-function . ,Piano_pedal_bracket::print)
-       (font-family . roman)
        (style . line)
        (if-text-padding . 1.0)
        (direction . -1)
        (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
        ))
 
+
+    (RemoveEmptyVerticalGroup
+     . (
+       (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
+       (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
+       (remove-first . #t)
+       (axes . (1))
+       (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface  spanner-interface))))
+       ))
+
     (RepeatSlash
      . (
        (print-function . ,Percent_repeat_item_interface::beat_slash)
        ;; (script-priority . 0) priorities for scripts, see script.scm
        (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
        (before-line-breaking-callback . ,Script_interface::before_line_breaking)
-       (font-family . music)
+       (font-encoding . music)
        (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
        ))
 
 
     (StanzaNumber
      . ((print-function . ,Text_item::print)           
-       (font-family . roman)
        (font-series . bold)
        (padding . 1.0)
        (X-offset-callbacks . (,Side_position_interface::aligned_side))
 
        (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
        ))
-    (NoteSpacing
-     . (
-       (stem-spacing-correction . 0.5)
-
-       ;; Changed this from 0.75.
-       ;; If you ever change this back, please document! --hwn
-       (knee-spacing-correction . 1.0)
-       
-       (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
-       ))
 
     (SostenutoPedal
      . (
        (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (no-spacing-rods . #t)
        (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
-       (font-family . roman)
        (font-shape . italic)
        (self-alignment-X . 0)
        (meta . ((interfaces . (text-interface  self-alignment-interface font-interface item-interface))))
        (X-extent-callback . ,Stem::dim_callback)       
        (Y-extent-callback . ,Stem::height)
        (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-       (font-family . music)      
-       (meta . ((interfaces . (stem-interface  font-interface item-interface ))))
+       (meta . ((interfaces . (stem-interface font-interface item-interface ))))
        ))
 
     (StemTremolo
        (glyph . "brace")
        (print-function . ,System_start_delimiter::print)
        (collapse-height . 5.0)
-       (font-family . braces)
+       (font-encoding . braces)
        (Y-extent-callback . #f)
        (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
        ))
        (staff-padding . 0.5)
        (script-priority . 200)
        ;; todo: add X self alignment?
-       (baseline-skip . 2)
-       (font-family . roman)
        (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
        ))
     (CombineTextScript
        (script-priority . 200)
        ;; todo: add X self alignment?
        (baseline-skip . 2)
-       (font-family . roman)
        (font-series . bold)
        (meta . ((interfaces . (text-script-interface text-interface  side-position-interface font-interface item-interface ))))
        ))
     (TextSpanner
      . (
        (print-function . ,Text_spanner::print)
-       (font-family . roman)
        (font-shape . italic)
        (style . dashed-line)
        (staff-padding . 0.1)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (print-function . ,Ottava_bracket::print)
        (font-shape . italic)
-       (font-family . roman)
        (shorten-pair . (0.0 . -0.6))
        (staff-padding . 1.0)
        (padding  . 0.5)
     
     (TabNoteHead
      . (
-       (font-family . roman)
        (style . default)
        (print-function . ,Text_item::print)
        (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
        (breakable . #t)
        (style . C)
 ;      (text . (,time-signature-glue-markup)) 
-       (font-family . number)
+       (font-encoding . number)
        (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
        ))
 
        (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
        (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
        (print-function . ,Tuplet_bracket::print)
-       (font-family . roman)
        (font-shape . italic)
        (font-series . bold)
 
     (UnaCordaPedal
      . (
        (print-function . ,Text_item::print)
-       (font-family . roman)
        (font-shape . italic)
        (no-spacing-rods . #t)
        (self-alignment-X . 0)
        (print-function . ,Volta_bracket_interface::print)
        (direction . 1)
        (padding . 1)
-       (font-family . number)
+       (font-encoding . number)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (thickness . 1.6)  ;  linethickness
        (height . 2.0) ; staffspace;
        (minimum-space . 5)
-       (font-family . number)
        (font-size . -4)
        (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
        ))
index 847a9100a9c68667a322f9c04c43b2282695f34e..a682fa62e73d3d40f9a0e031f7f7eb1f2329dd49 100644 (file)
@@ -1,6 +1,14 @@
 ;; As an excercise, do it with records.
 ;; Should use GOOPS, really.
 
+;; TODO:
+;;
+;; lookup-font should be written in  C.
+;;
+;; should dump tree to .texi as internal documentation
+;; 
+
+
 (define font-tree-record
   (make-record-type
    "font-tree-node"
                   (lookup-font (hashq-ref (font-tree-children node)
                                           def) alist-chain)))
         )
+      (if (equal? (chain-assoc-get  'font-family alist-chain) 'sans)
+         (display (list "...........\n" node alist-chain)))
       
       font))
    (else node))
        (add-font
        n
        `((font-encoding . text)
-         (font-series . ,(vector-ref (car x) 0))
+         (font-series . ,(vector-ref (car x) 2))
          (font-shape . ,(vector-ref (car x) 1))
-         (font-family . ,(vector-ref (car x) 2)))
+         (font-family . ,(vector-ref (car x) 0)))
        (cons (* factor (cadr x))
              (cddr x))
        ))
        ))
     n))
 
+(display-font-node (make-font-tree 1.0))
+
 (define-public (magstep x)
   (exp (* (/ x 6) (log 2))))