]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/pango-font.cc (text_stencil): Quick try at glyph->charcode
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 27 Dec 2004 15:22:06 +0000 (15:22 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 27 Dec 2004 15:22:06 +0000 (15:22 +0000)
mapping.
(index_to_charcode): New method.

* scm/output-ps.scm (glyph-string):
* scm/output-gnome.scm (glyph-string): Add FONT parameter.

20 files changed:
ChangeLog
lily/all-font-metrics.cc
lily/include/font-metric.hh
lily/include/open-type-font.hh
lily/include/pango-font.hh
lily/open-type-font.cc
lily/pango-font.cc
scm/bass-figure.scm
scm/c++.scm
scm/chord-entry.scm
scm/chord-ignatzek-names.scm
scm/chord-name.scm
scm/clef.scm
scm/define-context-properties.scm
scm/define-grob-interfaces.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-markup-commands.scm
scm/output-gnome.scm
scm/output-ps.scm

index 2c52e55590daec06711070b73cd131cde722ffd7..1e67c8a7181ee362f80a6785948a9fc3c7d48508 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-12-27  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * lily/pango-font.cc (text_stencil): Quick try at glyph->charcode
+       mapping.
+       (index_to_charcode): New method.
+
+       * scm/output-ps.scm (glyph-string): 
+       * scm/output-gnome.scm (glyph-string): Add FONT parameter.
+
 2004-12-26  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/output-gnome.scm (FIXME-glyph-string): New function.  Cannot
index c9b4b5d5e08a2a0f07e204e8c87b45c496b60a90..c681c03c9db431dc399323625475f0a20bd65198 100644 (file)
@@ -69,7 +69,7 @@ All_font_metrics::find_pango_font (PangoFontDescription*description)
                                       pango_dpi_,
                                       RIGHT,
                                       description);
-      val = pf->self_scm();
+      val = pf->self_scm ();
       pango_dict_->set (key, val);
       scm_gc_unprotect_object (val);
 
index b9da9002b9435e910275d0d3dab84e12b87acd64..6de18c5bdc5e72fb05551d93ffa4c43f6db23973 100644 (file)
@@ -15,7 +15,7 @@
 #include "smobs.hh"
 #include "lily-proto.hh"
 
-struct Font_metric
+class Font_metric
 {
 public:
   SCM description_;
@@ -53,13 +53,11 @@ protected:
 
 int get_encoded_index (Font_metric *m, String input_coding, int code);
 
-struct Simple_font_metric : public Font_metric
+class Simple_font_metric : public Font_metric
 {
 public:
-  
 };
-  
 
-DECLARE_UNSMOB(Font_metric, metrics);
+DECLARE_UNSMOB (Font_metric, metrics);
 
 #endif /* FONT_METRIC_HH */
index b730c560fc99ea78d9cc1b24bf2049c50b65c023..8bdbd45429fc2a298849a3bf0a11de3b85956dc7 100644 (file)
 #include "font-metric.hh"
 
 typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
+Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
 
 class Open_type_font : public Font_metric
 {
-  FT_Face face_; /* handle to face object */
+  /* handle to face object */  
+  FT_Face face_;
 
   SCM lily_subfonts_; 
   SCM lily_character_table_; 
index e6241c94938ec78fbe796dd7ba6033466d8e8ae6..13038a6ee5b489a35da08cfddec0d79e26b8c940 100644 (file)
@@ -1,11 +1,9 @@
-
 /*
   pango-font.hh -- declare Pango_font
 
   source file of the GNU LilyPond music typesetter
 
   (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef PANGO_FONT_HH
 #include <pango/pangoft2.h>
 #include "font-metric.hh"
 
-struct Pango_font : Font_metric
+#include "open-type-font.hh"
+
+class Pango_font : public Font_metric
 {
+  /** handle to face object */
+  FT_Face face_;
   PangoContext *context_;
   PangoAttrList *attribute_list_;
   Real scale_;
   SCM subfonts_;
+  Index_to_charcode_map index_to_charcode_map_;
+
 public:
-  virtual SCM sub_fonts () const;
-  SCM font_file_name () const;
-  virtual void derived_mark () const;
-  void register_font_file (String, String);
-  Stencil text_stencil (String) const;
   Pango_font (PangoFT2FontMap *,
              int dpi, 
              Direction leftright,
              PangoFontDescription *);
   ~Pango_font ();
+
+  SCM font_file_name () const;
+  void register_font_file (String, String);
+  Stencil text_stencil (String) const;
+
+  virtual SCM sub_fonts () const;
+  virtual void derived_mark () const;
+  virtual int name_to_index (String) const;
+  virtual unsigned index_to_charcode (int) const;
 };
-PangoFontDescription* 
-symbols_to_pango_font_description(SCM family,
-                                 SCM style,
-                                 SCM variant,
-                                 SCM weight,
-                                 SCM stretch,
-                                 Real size);
+
+PangoFontDescription *
+symbols_to_pango_font_description (SCM family,
+                                  SCM style,
+                                  SCM variant,
+                                  SCM weight,
+                                  SCM stretch,
+                                  Real size);
 
 Font_metric *
 select_pango_font (Output_def *layout, SCM chain);
 
-#endif
+#endif /* HAVE_PANGO16 */
+
 #endif /* PANGO_FONT_HH */
 
index 03dfa0c6dfb0d7b25239cbe2ffb0af627091be8b..da29e1884ac28b0846c76e264d34710dff9712a4 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include <map>
@@ -22,7 +21,7 @@ const Real point_constant = 1 PT;
 FT_Byte *
 load_table (char const *tag_str, FT_Face face, FT_ULong *length)
 {
-  FT_ULong tag = FT_MAKE_TAG(tag_str[0], tag_str[1], tag_str[2], tag_str[3]);
+  FT_ULong tag = FT_MAKE_TAG (tag_str[0], tag_str[1], tag_str[2], tag_str[3]);
 
   int error_code = FT_Load_Sfnt_Table (face, tag, 0, NULL, length);
   if (!error_code)
@@ -33,9 +32,7 @@ load_table (char const *tag_str, FT_Face face, FT_ULong *length)
 
       error_code = FT_Load_Sfnt_Table (face, tag, 0, buffer, length );
       if (error_code)
-       {
-         error (_f ("Could not load %s font table", tag_str));
-       }
+       error (_f ("Could not load %s font table", tag_str));
 
       return buffer;
     }
@@ -61,7 +58,6 @@ load_scheme_table (char const *tag_str, FT_Face face)
   return tab;
 }
 
-
 Index_to_charcode_map 
 make_index_to_charcode_map (FT_Face face)
 {
index 7529ae8115c40956db79fb4986c26aca906c19db..4e9dfd8061c0364273699a2f6439e12ac716835a 100644 (file)
 Pango_font::Pango_font (PangoFT2FontMap *fontmap,
                        int resolution,
                        Direction dir,
-                       PangoFontDescription * description)
+                       PangoFontDescription *description)
 {
   subfonts_ = SCM_EOL;
-  PangoDirection pango_dir = (dir==RIGHT)
+  PangoDirection pango_dir = (dir == RIGHT)
     ? PANGO_DIRECTION_LTR
     : PANGO_DIRECTION_RTL;
   context_ = pango_ft2_font_map_create_context (fontmap);  
@@ -36,7 +36,6 @@ Pango_font::Pango_font (PangoFT2FontMap *fontmap,
   pango_context_set_font_description (context_, description);
 }
 
-
 Pango_font::~Pango_font ()
 {
   g_object_unref (context_);
@@ -56,37 +55,50 @@ Pango_font::derived_mark () const
 {
   scm_gc_mark (subfonts_);
 }
+
 Stencil
 Pango_font::text_stencil (String str) const
 {
-  GList * items = pango_itemize (context_,
-                                str.to_str0 (),
-                                0, str.length (), attribute_list_,
-                                NULL);
+  GList *items = pango_itemize (context_,
+                               str.to_str0 (),
+                               0, str.length (), attribute_list_,
+                               NULL);
 
   const int GLYPH_NAME_LEN = 256;
   char glyph_name[GLYPH_NAME_LEN];
   
-  GList * ptr = items;
+  GList *ptr = items;
   Stencil dest;  
   while (ptr)
     {
+
+      // FIXME: factor this out
       PangoItem *item = (PangoItem*) ptr->data;
       PangoAnalysis *pa = &(item->analysis);
-      PangoGlyphString *pgs = pango_glyph_string_new();
+      PangoGlyphString *pgs = pango_glyph_string_new ();
 
       pango_shape (str.to_str0 (), str.length (), pa, pgs);
 
       PangoRectangle logical_rect;
       pango_glyph_string_extents (pgs, pa->font, NULL, &logical_rect);
       
-      PangoFcFont * fcfont = G_TYPE_CHECK_INSTANCE_CAST(pa->font,
-                                                       PANGO_TYPE_FC_FONT,
-                                                       PangoFcFont);
+      PangoFcFont *fcfont = G_TYPE_CHECK_INSTANCE_CAST(pa->font,
+                                                      PANGO_TYPE_FC_FONT,
+                                                      PangoFcFont);
       FT_Face ftface = pango_fc_font_lock_face (fcfont);
       Box b (Interval (0, logical_rect.width),
             Interval (0, logical_rect.height));
 
+      if (!face_)
+       {
+         /* FIXME.  This obvious shortcut apparently does not work.
+            It seems there are different faces per text string and a
+            map of face_ and charcode mapping is needed.  */
+         Pango_font *barf = (Pango_font*) this;
+         barf->face_ = ftface;
+         barf->index_to_charcode_map_ = make_index_to_charcode_map (face_);
+       }
+
       b.translate (Offset (- logical_rect.x, -logical_rect.y));
       
       b.scale (scale_);
@@ -105,7 +117,7 @@ Pango_font::text_stencil (String str) const
                                        scm_from_double (ggeo.y_offset * scale_),
                                        scm_makfrom0str (glyph_name)),
                            SCM_EOL);
-         tail = SCM_CDRLOC(*tail);
+         tail = SCM_CDRLOC (*tail);
        }
 
       FcPattern *fcpat = fcfont->font_pattern;
@@ -114,7 +126,8 @@ Pango_font::text_stencil (String str) const
       char const *ps_name = FT_Get_Postscript_Name (ftface);
       ((Pango_font *) this)->register_font_file (filename, ps_name);
       
-      SCM expr = scm_list_3 (ly_symbol2scm ("glyph-string"),
+      SCM expr = scm_list_4 (ly_symbol2scm ("glyph-string"),
+                            self_scm (),
                             scm_makfrom0str (ps_name),
                             ly_quote_scm (glyph_exprs));
 
@@ -141,13 +154,29 @@ Pango_font::font_file_name () const
   return SCM_BOOL_F;
 }
 
-LY_DEFINE(ly_pango_font_p, "ly:pango-font?",
-         1,0,0,
-         (SCM f),
-         "Is @var{f} a pango font?")
+int
+Pango_font::name_to_index (String nm) const
+{
+  char *nm_str = (char*) nm.to_str0 ();
+  if (int idx = FT_Get_Name_Index (face_, nm_str))
+    return idx;
+  return -1;
+}
+
+unsigned
+Pango_font::index_to_charcode (int i) const
+{
+  return ((Pango_font*) this)->index_to_charcode_map_[i];
+}
 
+LY_DEFINE (ly_pango_font_p, "ly:pango-font?",
+          1, 0, 0,
+          (SCM f),
+          "Is @var{f} a pango font?")
 {
   return scm_from_bool (dynamic_cast<Pango_font*> (unsmob_metrics (f)));
 }
 
+
 #endif
+
index a44f5216c0a8052646a1e42c6e83fc335df28a45..713cd4e0544bf900daaa572e81f72610a426c0a9 100644 (file)
@@ -16,8 +16,8 @@
   (define (fig-to-markup fig-music)
     (let* ((align-accs
            (eq? #t (ly:context-property context 'alignBassFigureAccidentals)))
-          (fig  (ly:music-property fig-music 'figure))
-          (acc  (ly:music-property fig-music 'alteration))
+          (fig (ly:music-property fig-music 'figure))
+          (acc (ly:music-property fig-music 'alteration))
           (acc-markup #f)
           (fig-markup
            (if (markup? fig)
       (filter-brackets (1+ i) (cdr figs)
 
                       (append
-                       (if  (eq? (ly:music-property (car figs) 'bracket-start) #t)
+                       (if (eq? (ly:music-property (car figs) 'bracket-start) #t)
                             (list i)
                             '())
-                       (if  (eq? (ly:music-property (car figs) 'bracket-stop) #t)
+                       (if (eq? (ly:music-property (car figs) 'bracket-stop) #t)
                             (list i)
                             '())
                        
index bcd343470a3bf8e293aa8b183be33f4ab25cde71..30a17841132039ffd26178578bff8389a634f9cc 100644 (file)
@@ -10,7 +10,7 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; type predicates.
-(define-public (number-pair?  x)
+(define-public (number-pair? x)
   (and (pair? x)
        (number? (car x)) (number? (cdr x))))
 
@@ -20,7 +20,7 @@
 (define-public (grob-list? x)
   (list? x))
 
-(define-public (moment-pair?  x)
+(define-public (moment-pair? x)
   (and (pair? x)
        (ly:moment? (car x)) (ly:moment? (cdr x))))
 
@@ -47,7 +47,7 @@
 (define-public (object-type obj)
   (match-predicate obj type-p-name-alist))
 
-(define-public (type-name  predicate)
+(define-public (type-name predicate)
   (let ((entry (assoc predicate type-p-name-alist)))
     (if (pair? entry) (cdr entry)
        "unknown")))
index ea7f87e00daf2070d29704895262263fe9aa22ec..ccfa0877d0c604b03e95b96f8476b7214fc7dcb4 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; chord-entry.scm -- Generate chord names for the parser.
 ;;;;
 ;;;; source file of the GNU LilyPond music typesetter
-;;;; 
+;;;;
 ;;;; (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 (define-public (construct-chord root duration modifications)
@@ -10,7 +10,7 @@ have duration DURATION..
 
 Notes: natural 11 is left from chord if not explicitly specified.
 
-Entry point for the parser. 
+Entry point for the parser.
 
 "
   (let* ((flat-mods (flatten-list modifications))
@@ -29,17 +29,17 @@ Entry point for the parser.
            (set! inversion (cadr mods))
            (set! mods (cddr mods))))
       (interpret-bass chord mods))
-      
+
     (define (interpret-bass chord mods)
-      "Read /+FOO   part. Side effect: BASS is set."
-      (if (and (>  (length mods) 1) (eq? (car mods) 'chord-bass))
+      "Read /+FOO part. Side effect: BASS is set."
+      (if (and (> (length mods) 1) (eq? (car mods) 'chord-bass))
          (begin
            (set! bass (cadr mods))
            (set! mods (cddr mods))))
       (if (pair? mods)
-         (scm-error  'chord-format "construct-chord" "Spurious garbage following chord: ~A" mods #f))
+         (scm-error 'chord-format "construct-chord" "Spurious garbage following chord: ~A" mods #f))
       chord)
-      
+
     (define (interpret-removals         chord mods)
       (define (inner-interpret chord mods)
        (if (and (pair? mods) (ly:pitch? (car mods)))
@@ -49,8 +49,8 @@ Entry point for the parser.
       (if (and (pair? mods) (eq? (car mods) 'chord-caret))
          (inner-interpret chord (cdr mods))
          (interpret-inversion chord mods)))
-    
-    (define (interpret-additions  chord mods)
+
+    (define (interpret-additions chord mods)
       "Interpret additions. TODO: should restrict modifier use?"
       (cond ((null? mods) chord)
            ((ly:pitch? (car mods))
@@ -71,14 +71,14 @@ Entry point for the parser.
                            0 -1))
                     (ly:pitch-notename p)
                     (ly:pitch-alteration p)))
-    
+
     (define (process-inversion complete-chord)
       "Take out inversion from COMPLETE-CHORD, and put it at the bottom.
 Return (INVERSION . REST-OF-CHORD).
 
 Side effect: put original pitch in INVERSION.
 If INVERSION is not in COMPLETE-CHORD, it will be set as a BASS, overriding
-the bass specified.  
+the bass specified.
 
 "
       (let* ((root (car complete-chord))
@@ -100,11 +100,11 @@ the bass specified.
            rest-of-chord)))
     ;; root is always one octave too low.
     ;; something weird happens when this is removed,
-    ;; every other chord is octavated. --hwn... hmmm. 
+    ;; every other chord is octavated. --hwn... hmmm.
     (set! root (ly:pitch-transpose root (ly:make-pitch 1 0 0)))
     ;; skip the leading : , we need some of the stuff following it.
     (if (pair? flat-mods)
-       (if (eq? (car flat-mods)  'chord-colon)
+       (if (eq? (car flat-mods) 'chord-colon)
            (set! flat-mods (cdr flat-mods))
            (set! start-additions #f)))
     ;; remember modifier
@@ -112,7 +112,7 @@ the bass specified.
        (begin
          (set! lead-mod (car flat-mods))
          (set! flat-mods (cdr flat-mods))))
-    ;; extract first  number if present, and build pitch list.
+    ;; extract first number if present, and build pitch list.
     (if (and (pair? flat-mods)
             (ly:pitch?  (car flat-mods))
             (not (eq? lead-mod sus-modifier)))
@@ -137,9 +137,9 @@ the bass specified.
             (get-step 3 complete-chord)
             (= 0 (ly:pitch-alteration (get-step 11 complete-chord)))
             (= 0 (ly:pitch-alteration (get-step 3 complete-chord))))
-       (set! complete-chord (remove-step 11  complete-chord)))
+       (set! complete-chord (remove-step 11 complete-chord)))
     ;; must do before processing inversion/bass, since they are
-    ;; not relative to the root. 
+    ;; not relative to the root.
     (set! complete-chord (map (lambda (x) (ly:pitch-transpose x root))
                              complete-chord))
     (if inversion
@@ -151,7 +151,7 @@ the bass specified.
          (write-me "\n*******\n" flat-mods)
          (write-me "root: " root)
          (write-me "base chord: " base-chord)
-         (write-me "complete  chord: " complete-chord)
+         (write-me "complete chord: " complete-chord)
          (write-me "inversion: " inversion)
          (write-me "bass: " bass)))
     (if inversion
@@ -229,7 +229,7 @@ DURATION, and INVERSION."
 UPPER-STEP separately."
   (cond ((null? base) '())
        ((> (ly:pitch-steps upper-step) (ly:pitch-steps (car base)))
-        (cons (car base) (stack-thirds upper-step  (cdr base))))
+        (cons (car base) (stack-thirds upper-step (cdr base))))
        ((<= (ly:pitch-steps upper-step) (ly:pitch-steps (car base)))
         (list upper-step))
        (else '())))
index 19e30fac636e80dcdbfcdfcb5eb5e80c3c9c2ea9..d53c13b9e6a056a31c1b8e9fce47be6737186647 100644 (file)
@@ -79,7 +79,7 @@
          nn)))
 
   (define (is-natural-alteration? p)
-    (= (natural-chord-alteration p)  (ly:pitch-alteration p)))
+    (= (natural-chord-alteration p) (ly:pitch-alteration p)))
   
   (define (ignatzek-format-chord-name
           root
@@ -212,12 +212,12 @@ work than classifying the pitches."
         (alterations '()))
     
     (if exception
-       (ignatzek-format-exception  root exception bass-note)
+       (ignatzek-format-exception root exception bass-note)
        
        (begin
          ;; no exception.
          ;; handle sus4 and sus2 suffix: if there is a 3 together with
-         ;; sus2 or sus4, then we explicitly say  add3.
+         ;; sus2 or sus4, then we explicitly say add3.
          (map
           (lambda (j)
             (if (get-step j pitches)
@@ -226,7 +226,7 @@ work than classifying the pitches."
                       (begin
                         (set! add-steps (cons (get-step 3 pitches) add-steps))
                         (set! pitches (remove-step 3 pitches))))
-                  (set! suffixes  (cons (get-step j pitches) suffixes)))))
+                  (set! suffixes (cons (get-step j pitches) suffixes)))))
           '(2 4))
 
          ;; do minor-3rd modifier.
index 2c63a7d4e9c40d190da5e7b098b1c4c204d4b73a..e964da8bfb5f49247196daaa8e6f72f6427dfd66 100644 (file)
@@ -56,7 +56,7 @@
       (make-normal-size-super-markup
        (accidental->markup (cdr n-a)))))))
 
-(define-public (note-name->german-markup  pitch)
+(define-public (note-name->german-markup pitch)
   (let* ((name (ly:pitch-notename pitch))
         (alt (ly:pitch-alteration pitch))
         (n-a (if (member (cons name alt) `((6 . ,FLAT) (6 . ,DOUBLE-FLAT)))
     (make-line-markup
      (list
       (string-append
-       (list-ref '("c" "d" "e" "f" "g" "a" "h" "b")  (car n-a))
+       (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car n-a))
        (if (or (equal? (car n-a) 2) (equal? (car n-a) 5))
-          (list-ref '( "ses"  "s" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))
+          (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))
           (list-ref '("eses" "es" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))))))))
 
 ;; fixme we should standardize on omit-root (or the other one.)
-;; perhaps the  default should also be reversed --hwn
+;; perhaps the default should also be reversed --hwn
 (define-public (sequential-music-to-chord-exceptions seq . rest)
   "Transform sequential music SEQ of type <<c d e>>-\\markup{ foobar }
 to (cons CDE-PITCHES FOOBAR-MARKUP), or to (cons DE-PITCHES
index 69f2bc79c3f5a00d63f2436f8801ba04f3801d3b..e8304b06225cf33a0ba60198e22c10deca7161f4 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; clef.scm -- Clef settings
 ;;;;
 ;;;; source file of the GNU LilyPond music typesetter
-;;;; 
+;;;;
 ;;;; (c)  2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 
@@ -28,7 +28,7 @@
     ("percussion" . ("clefs.percussion" 0 0))
     ("tab" . ("clefs.tab" 0 0))
 
-    ;; should move mensural stuff to separate file? 
+    ;; should move mensural stuff to separate file?
     ("vaticana-do1" . ("clefs.vaticana-do" -1 0))
     ("vaticana-do2" . ("clefs.vaticana-do" 1 0))
     ("vaticana-do3" . ("clefs.vaticana-do" 3 0))
                   (- (string->number (match:substring match 3)) 1)))))
     (set! e (assoc clef-name supported-clefs))
     (if (pair? e)
-       (let* ((musics (map make-prop-set  
+       (let* ((musics (map make-prop-set
                            `(((symbol . clefGlyph) (value . ,(cadr e)))
                              ((symbol . middleCPosition)
                               (value . ,(+ oct
index f5404a7d8b66218d35a197cf6647e1d96079a1b4..6cb8ecc3bbb216bccd3e1bc274b3ad82975fd3dd 100644 (file)
@@ -11,7 +11,7 @@
 (define (translator-property-description symbol type? description)
  (if (not (equal? #f (object-property symbol 'translation-doc)))
       (begin
-       (ly:warn  "Redefining ~S " symbol)
+       (ly:warn "Redefining ~S " symbol)
        (exit 2)))
   
   (set-object-property! symbol 'translation-type? type?)
@@ -28,7 +28,7 @@
      (alignBassFigureAccidentals ,boolean?
                                 "If true, then the accidentals are aligned in bass figure context.")
 
-     (allowBeamBreak ,boolean? "If true allow line breaks for  beams over bar lines.")
+     (allowBeamBreak ,boolean? "If true allow line breaks for beams over bar lines.")
      (associatedVoice ,string? "Name of the
 @code{Voice} that has the melody for this @code{Lyrics} line.")
      (autoBeamSettings ,list? "Specifies
@@ -312,13 +312,13 @@ with other voices is preserved.
 
 @example
 @@lilypond[fragment,verbatim,center]
-r1 r1*3 R1*3  \\\\property Score.skipBars= ##t r1*3 R1*3
+r1 r1*3 R1*3 \\\\property Score.skipBars= ##t r1*3 R1*3
 @@end lilypond
 @end example
 ")
      (skipTypesetting ,boolean?
                      "When true, all no typesetting is done, speeding
-up  the interpretation phase. This speeds up debugging large scores.")
+up the interpretation phase. This speeds up debugging large scores.")
      (soloIIText ,string? "text for begin of solo for voice ``two'' when part-combining.")
      (soloText ,string? "text for begin of solo when part-combining.")
      (squashedPosition ,integer? " Vertical position of
@@ -370,8 +370,8 @@ is called to determine the text to print on a tuplet bracket.")
 
      (tupletSpannerDuration ,ly:moment? "
 Normally a tuplet bracket is as wide as the
-@code{\\times} expression that gave rise to it. By setting this
-property, you can make brackets last shorter. Example
+@code{\\times} expression that gave rise to it.  By setting this
+property, you can make brackets last shorter.  Example
 
 @example
 @@lilypond[verbatim,fragment]
@@ -394,7 +394,7 @@ to 10 (5+5) staffspaces high.
 @end example
 
 
-This does not work for Voice or any other context  that doesn't form a
+This does not work for Voice or any other context that doesn't form a
 vertical group.")
      
      (verticallySpacedContexts ,list? "List of symbols, containing
@@ -457,7 +457,7 @@ for this staff.")
      (localKeySignature ,list? "the key signature at this point in the
 measure.  The format is the same as for keySignature, but can also
 contain ((@var{octave} . @var{name}) . (@var{alter} . @var{barnumber}))
-pairs. It is reset at every bar line."  )
+pairs. It is reset at every bar line.")
 
      
      (localKeySignatureChanges ,list? "Experimental. [DOCME]")
@@ -467,7 +467,7 @@ pairs. It is reset at every bar line."  )
 conses. This is for internal (C++) use only.  This property contains
 the grobs which are still busy (e.g. note heads, spanners, etc.)
 ")
-     (barCheckLastFail ,ly:moment? "Where in  the measure did the last barcheck fail?") 
+     (barCheckLastFail ,ly:moment? "Where in the measure did the last barcheck fail?") 
      (associatedVoiceContext ,ly:context? "The context object of the Voice that has the melody for this Lyrics.")
      (acceptHashTable ,vector? "Internal
 variable: store table with MusicName to Engraver entries.")
index 287c45228853052f7956bc87581f63a983312749..412917ab4f19e04e69ef6fee59ac2cf59a0962c0 100644 (file)
@@ -107,5 +107,5 @@ are interesting enough to maintain a hara-kiri staff."
 (ly:add-interface
  'vertically-spaceable-interface 
  "Objects that should be kept at constant vertical distances. Typically:
-@internalsref{VerticalAxisGroup} objects  of @internalsref{Staff} contexts."
+@internalsref{VerticalAxisGroup} objects of @internalsref{Staff} contexts."
  '())
index 7ec6cd8847ae0c400929d237e8a4eaebfcf19ba1..f116d1a4529f8d0a21ee2ccc987ca68a39b1da11 100644 (file)
@@ -52,7 +52,7 @@ called first.  The functions take a grob and axis argument. ")
 arrow on the arpeggio squiggly line.")
   
      (auto-knee-gap ,ly:dimension? "If a gap is found between note heads
-where a  horizontal beam fits that is larger than this number,  make a kneed beam.")
+where a horizontal beam fits that is larger than this number, make a kneed beam.")
      (axes ,list? "list of axis numbers.
 In the case of alignment grobs, this should contain only one number.")
 
@@ -81,7 +81,7 @@ Choices include @code{curved} and @code{straight}.")
      (beamed-extreme-minimum-free-lengths ,list? "list of extreme minimum free stem lengths (chord to beams) given beam multiplicity.")
 
      (beamed-stem-shorten ,list? "How much to shorten beamed stems,
-when their direction is forced. It is a  list, since the value is different
+when their direction is forced. It is a list, since the value is different
 depending on the number flags/beams.")
      (beaming ,pair?
              "Pair of number lists. Each number list specifies which
@@ -157,11 +157,11 @@ line).")
 direction of a beam. Choices include: 
 
 @table @code
-@item  beam-dir-majority
+@item beam-dir-majority
 number count of up or down notes
 @item beam-dir-mean
 mean center distance of all notes
-@item  beam-dir-median.
+@item beam-dir-median.
 mean center distance weighted per note
 @end table
 
@@ -616,7 +616,7 @@ functions set spanner positions.")
      (interfaces ,list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
      (shorten ,ly:dimension? "The amount of space that a
 stem. Internally used to distribute beam shortening over stems. ")
-     (slur  ,ly:grob? "A pointer to a slur object")
+     (slur ,ly:grob? "A pointer to a slur object")
      (use-breve-rest ,boolean? "Use breve rests for measures longer
 than a whole rest.")
      
index 343f261a6e6d32afed1e713db5b75e196126772d..5b8ea469c50e5a8051aa806672af136047466226 100644 (file)
@@ -1,7 +1,7 @@
-;;;; define-grobs.scm -- 
+;;;; define-grobs.scm --
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
+;;;;
 ;;;; (c)  1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
 
@@ -9,7 +9,7 @@
 ;;;; staffspace (distances)
 
 ;;;; WARNING: the meta field should be the last one.
-;;;; WARNING: don't use anonymous functions for initialization. 
+;;;; WARNING: don't use anonymous functions for initialization.
 
 ;; TODO: junk the meta field in favor of something more compact?
 (define-public all-grob-descriptions
     (Accidental
      . (
        (print-function . ,Accidental_interface::print)
-       (inside-slur . #t) 
+       (inside-slur . #t)
        (cautionary-style . parentheses)
        (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)             (meta . ((interfaces . (item-interface accidental-interface
                                                                                                                                       font-interface))))
        ))
-    
+
     (AccidentalPlacement
      . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
        (left-padding . 0.2)
                        (clef . (extra-space . 0.5))
                        (key-signature . (extra-space . 0.0))
                        (staff-bar . (extra-space . 0.0))
-                       (time-signature . (extra-space . 0.0)) 
+                       (time-signature . (extra-space . 0.0))
                        (first-note . (fixed-space . 0.0))
                        ))
        (breakable . #t)
        (break-align-symbol . ambitus)
        (break-visibility . ,begin-of-line-visible)
-       (meta . ((interfaces . (axis-group-interface break-aligned-interface ambitus-interface item-interface  ))))
+       (meta . ((interfaces . (axis-group-interface break-aligned-interface ambitus-interface item-interface))))
        ))
 
     (AmbitusLine
@@ -56,8 +56,8 @@
        (join-heads . #t)
        (thickness . 2)
        (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
-    
-       (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface  font-interface))))
+
+       (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface font-interface))))
        ))
     (AmbitusAccidental
      . (
        (font-family . music)
        (padding . 0.5)
        (X-offset-callbacks . (,Side_position_interface::aligned_side))
-       (direction . -1) 
+       (direction . -1)
        (cautionary-style . parentheses)
        (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)             (meta . ((interfaces . (item-interface accidental-interface break-aligned-interface side-position-interface font-interface))))
        ))
-    
+
     (AmbitusNoteHead
      . (
        (duration-log . 2)
        (style . default)
        (print-function . ,Note_head::print)
        (glyph-name-procedure . ,find-notehead-symbol)
-       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (meta . ((interfaces . (font-interface note-head-interface
                                               ambitus-interface
                                               staff-symbol-referencer-interface
                                               ledgered-interface
                                               item-interface ))))
        ))
-    
+
     (Arpeggio
      . (
        (X-extent-callback . ,Arpeggio::width_callback)
-       (Y-extent-callback . #f)               
+       (Y-extent-callback . #f)        
        (print-function . ,Arpeggio::print)
        (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (X-offset-callbacks . (,Side_position_interface::aligned_side))
        (direction . -1)
-       (padding . 0.5)  
+       (padding . 0.5)
        (staff-position . 0.0)
        (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
        ))
        (glyph . "|")
        (break-glyph-function . ,default-break-barline)
        (bar-size-procedure . ,Bar_line::get_staff_bar_size)
-       (print-function . ,Bar_line::print)        
+       (print-function . ,Bar_line::print)     
        (break-visibility . ,all-visible)
        (breakable . #t)
        (before-line-breaking-callback . ,Bar_line::before_line_breaking)
        (space-alist . (
-                       (time-signature . (extra-space . 0.75)) 
+                       (time-signature . (extra-space . 0.75))
                        (custos . (minimum-space . 2.0))
-                       (clef .   (minimum-space . 1.0))
+                       (clef . (minimum-space . 1.0))
                        (key-signature . (extra-space . 1.0))
                        (key-cancellation . (extra-space . 1.0))
                        (first-note . (fixed-space . 1.3))
        ;; Ross. page 151 lists other values, we opt for a leaner look
        ;;
        ;; TODO:
-       ;; kern should scale with linethickness too. 
+       ;; kern should scale with linethickness too.
        (kern . 3.0)
        (thin-kern . 3.0)
        (hair-thickness . 1.9)
        (thick-thickness . 6.0)
-       (meta . ((interfaces . (bar-line-interface item-interface   break-aligned-interface font-interface))))
+       (meta . ((interfaces . (bar-line-interface item-interface break-aligned-interface font-interface))))
        ))
 
-    
+
     (BarNumber
      . (
        (print-function . ,Text_interface::print)
        (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (self-alignment-X . 1)
 
-       ;; hmm. why did we do this: ? 
+       ;; hmm. why did we do this: ?
        (extra-offset . (1.3 . 0))
        (meta .
              ((interfaces . (side-position-interface
                              text-interface
                              self-alignment-interface
-                             font-interface item-interface  break-aligned-interface))))
+                             font-interface item-interface break-aligned-interface))))
 
             ))
 
 
     (BreakAlignGroup
      . (
-       (axes  . (0))
+       (axes . (0))
        (X-offset-callbacks . (,Break_align_interface::alignment_callback))
        (X-extent-callback . ,Axis_group_interface::group_extent_callback)
        (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
                        (key-signature . (minimum-space . 1.5))
                        (staff-bar . (minimum-space . 1.5))
                        (clef . (minimum-space . 2.0))
-                       (first-note . (fixed-space . 1.0)) ;huh? 
+                       (first-note . (fixed-space . 1.0)) ;huh?
                        (right-edge . (extra-space . 0.1))
                        ))
        (print-function . ,Text_interface::print)
        (print-function . ,Clef::print)
        (before-line-breaking-callback . ,Clef::before_line_breaking)
        (breakable . #t)
-       (font-family . music)      
+       (font-family . music)   
        (break-align-symbol . clef)
        (break-visibility . ,begin-of-line-visible)
        (space-alist . ((ambitus . (extra-space . 2.0))
                        (next-note . (extra-space . 0.5))
                        (right-edge . (extra-space . 0.5))
                        ))
-       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
        ))
-    
+
     (ClusterSpannerBeacon
      . (
        (print-function . #f)
        (Y-extent-callback . ,Cluster_beacon::height)
        (meta . ((interfaces . (cluster-beacon-interface item-interface))))
        ))
-    
+
     (ClusterSpanner
      . (
        (print-function . ,Cluster::print)
        ))
     (DynamicTextSpanner
      . ((print-function . ,Dynamic_text_spanner::print)
-       (font-series . bold) 
+       (font-series . bold)
        (font-shape . italic)
        (style . dashed-line)
 
        ; need to blend with dynamic texts.
        (font-size . 2)
-       (bound-padding . 0.75) 
+       (bound-padding . 0.75)
        (dash-fraction . 0.2)
        (dash-period . 3.0)
        (meta . ((interfaces . (font-interface
-                               text-interface 
+                               text-interface
                                dynamic-interface dynamic-text-spanner-interface
                                item-interface))))
         ))
-    
+
     (DynamicLineSpanner
      . (
        (axes . (1))
     (LeftEdge
      . (
        (break-align-symbol . left-edge)
-       (X-extent .  (0 . 0))
+       (X-extent . (0 . 0))
        (breakable . #t)
        (space-alist . (
                        (custos . (extra-space . 0.0))
                        (ambitus . (extra-space . 2.0))
-                       (time-signature . (extra-space . 0.0)) 
+                       (time-signature . (extra-space . 0.0))
                        (staff-bar . (extra-space . 0.0))
-                       (breathing-sign . (minimum-space  . 0.0))
+                       (breathing-sign . (minimum-space . 0.0))
                        (clef . (extra-space . 0.85))
                        (first-note . (fixed-space . 1.0))
                        (right-edge . (extra-space . 0.0))
        (zigzag-width . 0.75)
        (breakable . #t)
        (X-extent-callback . #f)
-       (Y-extent-callback . #f)                         
+       (Y-extent-callback . #f)                        
        (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
        (print-function . ,Line_spanner::print)
        (meta . ((interfaces . (line-interface line-spanner-interface spanner-interface))))
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (padding . 0.2)
        (direction . -1)
-       (bracket-flare . (0.5 . 0.5)) 
+       (bracket-flare . (0.5 . 0.5))
        (meta . ((interfaces . (horizontal-bracket-interface
                                side-position-interface
                                line-interface
        (baseline-skip . 2)
        (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
        ))
-    
+
     (VocalName
      . (
        (breakable . #t)
        (print-function . ,Key_signature_interface::print)
        (space-alist . (
                        (time-signature . (extra-space . 1.25))
-                       (staff-bar .  (extra-space . 0.6))
+                       (staff-bar . (extra-space . 0.6))
                        (key-signature . (extra-space . 0.5))
                        (right-edge . (extra-space . 0.5))
                        (first-note . (fixed-space . 2.5))
        (print-function . ,Key_signature_interface::print)
        (space-alist . (
                        (time-signature . (extra-space . 1.25))
-                       (staff-bar .  (extra-space . 1.1))
+                       (staff-bar . (extra-space . 1.1))
                        (right-edge . (extra-space . 0.5))
                        (first-note . (fixed-space . 2.5))
                        ))
        (print-function . ,Ledger_line_spanner::print)
        (meta . ((interfaces . (spanner-interface ledger-line-interface))))
        ))
-    
+
     (LigatureBracket
      . (
        (ligature-primitive-callback . ,Note_head::print)
        (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
        (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
        (print-function . ,Tuplet_bracket::print)
-       (meta .  ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
+       (meta . ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
        ))
 
     (LyricHyphen
        (length . 0.66)
        (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
        (print-function . ,Hyphen_spanner::print)
-       (Y-extent  . (0 . 0))
+       (Y-extent . (0 . 0))
        (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
                                                spanner-interface))))
        ))
        (padding . 1)
        (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
        ))
-    
+
     (MultiMeasureRestNumber
      . (
        (print-function . ,Text_interface::print)
        (print-function . ,Note_head::print)
        (ligature-primitive-callback . ,Note_head::print)
        (glyph-name-procedure . ,find-notehead-symbol)
-       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (stem-attachment-function . ,note-head-style->attachment-coordinates)
        (meta . ((interfaces . (rhythmic-grob-interface
                                rhythmic-head-interface font-interface note-head-interface
        (gap . 0.5)
        (breakable . #t)
        (X-extent-callback . #f)
-       (Y-extent-callback . #f)                         
+       (Y-extent-callback . #f)                        
        (print-function . ,Line_spanner::print)
        (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
        (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
 ;      (print-function . ,Paper_column::print) (font-name . "ecrm8")   (Y-extent-callback . #f)
 
 
-       (meta .  ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
+       (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
        ))
 
     (PercentRepeat
        (slope . 1.0)
        (thickness . 0.48)
        (font-encoding . fetaMusic)
-       (meta . ((interfaces . (multi-measure-rest-interface  spanner-interface font-interface percent-repeat-interface))))
+       (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
        ))
 
-    (PianoPedalBracket   ;; an example of a text spanner
+    ;; an example of a text spanner
+    (PianoPedalBracket
      . (
        (print-function . ,Piano_pedal_bracket::print)
        (style . line)
        (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
        (remove-first . #t)
        (axes . (1))
-       (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface hara-kiri-group-interface item-interface  spanner-interface))))
+       (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface hara-kiri-group-interface item-interface spanner-interface))))
        ))
 
     (RepeatSlash
 
     (SpacingSpanner
      . (
-       (spacing-procedure .  ,Spacing_spanner::set_springs)
+       (spacing-procedure . ,Spacing_spanner::set_springs)
        (grace-space-factor . 0.6)
        (shortest-duration-space . 2.0)
        (spacing-increment . 1.2)
     (SpanBar
      . (
        (break-align-symbol . staff-bar)
-       (bar-size-procedure . ,Span_bar::get_bar_size) 
+       (bar-size-procedure . ,Span_bar::get_bar_size)
        (print-function . ,Span_bar::print)
        (X-extent-callback . ,Span_bar::width_callback)
        (Y-extent-callback . ())
        (breakable . #t)
        (before-line-breaking-callback . ,Span_bar::before_line_breaking)
-       ;; ugh duplication! 
+       ;; ugh duplication!
 
        ;;
        ;; Ross. page 151 lists other values, we opt for a leaner look
-       ;; 
+       ;;
        (kern . 3.0)
        (thin-kern . 3.0)
        (hair-thickness . 1.6)
        (font-series . bold)
        (padding . 1.0)
        (X-offset-callbacks . (,Side_position_interface::aligned_side))
-       (direction . ,LEFT) 
+       (direction . ,LEFT)
        (meta . ((interfaces . (side-position-interface stanza-number-interface text-interface font-interface item-interface ))))               
        ))
 
        (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
        (font-shape . italic)
        (self-alignment-X . 0)
-       (meta . ((interfaces . (text-interface  self-alignment-interface font-interface item-interface))))
+       (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface))))
        ))
 
-    (SostenutoPedalLineSpanner 
+    (SostenutoPedalLineSpanner
      . (
        (axes . (1))
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
        (padding . 1.2)
        (minimum-space . 1.0)
        (direction . -1)
-       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface  spanner-interface))))
+       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
        ))
 
     (StaffSymbol
      . (
        (print-function . ,Staff_symbol::print)
        (line-count . 5)
-       (ledger-line-thickness  . (1.0 . 0.1))
+       (ledger-line-thickness . (1.0 . 0.1))
        (layer . 0)
        (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
        ))
        (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
        ))
 
-    (SustainPedalLineSpanner 
+    (SustainPedalLineSpanner
      . (
        (axes . (1))
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (direction . 1)
-       (extra-offset . (-1 . 0)) 
+       (extra-offset . (-1 . 0))
        (padding . 0.5)
        (staff-padding . 0.5)
        (script-priority . 200)
        ;; todo: add X self alignment?
        (baseline-skip . 2)
        (font-series . bold)
-       (meta . ((interfaces . (text-script-interface text-interface  side-position-interface font-interface item-interface ))))
+       (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
        ))
     (TextSpanner
      . (
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))             
        ))
-    
+
     (OttavaBracket
      . (
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (font-shape . italic)
        (shorten-pair . (0.0 . -0.6))
        (staff-padding . 1.0)
-       (padding  . 0.5)
+       (padding . 0.5)
        (minimum-length . 1.0)
        (dash-fraction . 0.3)
        (edge-height . (0 . 1.2))
                                line-interface side-position-interface
                                font-interface text-interface spanner-interface))))             
        ))
-    
+
     (TabNoteHead
      . (
        (style . default)
        (print-function . ,Text_interface::print)
-       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
        (stem-attachment-function . ,tablature-stem-attachment-function)
        (meta . ((interfaces
        (thickness . 1.2)
        (x-gap . -0.1)
        (y-offset . 0.6)
-       (minimum-length  . 2.5)
+       (minimum-length . 2.5)
        (meta . ((interfaces . (tie-interface spanner-interface))))
        ))
 
        (space-alist . (
                        (first-note . (fixed-space . 2.0))
                        (right-edge . (extra-space . 0.5))
-                       (staff-bar .  (minimum-space . 2.0))
+                       (staff-bar . (minimum-space . 2.0))
                        ))
        (breakable . #t)
        (style . C)
-;      (text . (,time-signature-glue-markup)) 
+;      (text . (,time-signature-glue-markup))
        (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
        ))
 
        (font-series . bold)
 
        (font-size . -2)
-       (meta .  ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
+       (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
        ))
 
     (UnaCordaPedal
        (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
        ))
 
-    (UnaCordaPedalLineSpanner 
+    (UnaCordaPedalLineSpanner
      . (
        (axes . (1))
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
        (padding . 1)
        (font-encoding . fetaNumber)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (thickness . 1.6)  ;  linethickness
-       (height . 2.0) ; staffspace;
+       (thickness . 1.6)  ;;  linethickness
+       (height . 2.0) ;; staffspace;
        (minimum-space . 5)
        (font-size . -4)
        (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
        ))
-    
+
     (VerticalAlignment
      . (
        (axes . (1))
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
        (X-extent-callback . ,Axis_group_interface::group_extent_callback)
        (stacking-dir . -1)
-       ;; (threshold .  (6 . 1000))
+       ;; (threshold . (6 . 1000))
        (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
        ))
 
 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
 
 
-;;  (display  (map pair? all-grob-descriptions))
+;;  (display (map pair? all-grob-descriptions))
 
 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
 
 (map (lambda (x)
        ;; (display (car x)) (newline)
-       
+
        (set-object-property! (car x) 'translation-type? list?)
        (set-object-property! (car x) 'is-grob? #t))
      all-grob-descriptions)
index 5c1c745d3b8c1e72d8415da9b85997f37e636295..120b25568d3d52bd3af1974c8c84bbec3ca35d35 100644 (file)
@@ -26,7 +26,7 @@
          (ly:warn "No systems found in \\score markup. Did you forget \\layout?")
          empty-markup)
        (begin
-         (let* ((stencil (ly:paper-system-stencil  (vector-ref systems 0)))) 
+         (let* ((stencil (ly:paper-system-stencil (vector-ref systems 0)))) 
 
            (ly:stencil-align-to! stencil Y CENTER)
            stencil)))))
@@ -77,14 +77,14 @@ For the postscript backend, use the following
 @verbatim
 gsave /ecrm10 findfont 
  10.0 output-scale div 
- scalefont setfont  90 rotate (hello) show grestore 
+ scalefont setfont 90 rotate (hello) show grestore 
 @end verbatim
 "
   ;; FIXME
   
   (ly:make-stencil
    (list 'embedded-ps str)
-   '(0 . 0) '(0 . 0)  ))
+   '(0 . 0) '(0 . 0)))
 
 ;;(def-markup-command (fill-line layout props line-width markups)
 ;;  (number? markup-list?)
@@ -103,7 +103,7 @@ gsave /ecrm10 findfont
          (map (lambda (stc)
                 (if (ly:stencil-empty? stc)
                     point-stencil
-                    stc))  orig-stencils))
+                    stc)) orig-stencils))
         (text-width (apply +
                            (map (lambda (stc)
                                   (if (ly:stencil-empty? stc)
index c4791998dea783b8174e0ba5183919a350df4cd2..15fdff495fb4b9d8dff4bfd03dc46b5360dfde62 100644 (file)
@@ -149,6 +149,36 @@ lilypond -fgnome input/simple-song.ly
          "LilyPondBraces"
          family)))
 
+(define (pango-font-name font)
+  (debugf "FONT-NAME:~S:~S\n" (ly:font-name font) (ly:font-design-size font))
+  (debugf "FONT-FAMILY:~S:~S\n" (font-family font) (otf-name-mangling font (font-family font)))
+  (otf-name-mangling font (font-family font)))
+
+(define (pango-font-size font)
+  (let* ((designsize (ly:font-design-size font))
+        (magnification (* (ly:font-magnification font)))
+        
+        ;;font-name: "GNU-LilyPond-feta-20"
+        ;;font-file-name: "feta20"
+        ;;pango-font-name: "lilypond-feta, regular 32"
+        ;;OPS:2.61
+        ;;scaling:29.7046771653543
+        ;;magnification:0.569055118110236
+        ;;design:20.0
+        
+        ;; ugh, experimental sizing
+        ;; where does factor ops come from?
+        ;; Hmm, design size: 26/20 
+        (ops 2.60)
+        
+        (scaling (* ops magnification designsize)))
+    (debugf "OPS:~S\n" ops)
+    (debugf "scaling:~S\n" scaling)
+    (debugf "magnification:~S\n" magnification)
+    (debugf "design:~S\n" designsize)
+    
+    scaling))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Wrappers from guile-gnome TLA
 ;;; guile-gnome-devel@gnu.org--2004
@@ -306,23 +336,26 @@ lilypond -fgnome input/simple-song.ly
 ;; FIXME: the framework-gnome backend needs to see every item that
 ;; gets created.  All items created here must should be put in a group
 ;; that gets returned.
-(define (FIXME-glyph-string postscript-font-name named-glyphs)
+(define (glyph-string font postscript-font-name x-y-named-glyphs)
   (for-each
    (lambda (x)
+
+     ;; UGR, glyph names not found
+     (stderr "GLYPH:~S\n" (caddr x))
+     (stderr "ID:~S\n" (ly:font-glyph-name-to-charcode font (caddr x)))
      (placebox (car x) (cadr x)
               (make <gnome-canvas-text>
                 #:parent (canvas-root)
                 #:x 0.0 #:y 0.0
                 #:anchor 'west
-                ;; FIXME: 
-                #:font postscript-font-name
+                ;;#:font postscript-font-name
+                #:font (pango-font-name font)
                 #:size-points 12
                 #:size-set #t
                 #:text
-                ;; FIXME: need FONT to get to charcode
                 (integer->utf8-string
-                 (ly:font-glyph-name-to-charcode font caddr x)))))
-   text-snippets))
+                 (ly:font-glyph-name-to-charcode font (caddr x))))))
+   x-y-named-glyphs))
 
 (define (grob-cause grob)
   grob)
@@ -375,36 +408,6 @@ lilypond -fgnome input/simple-song.ly
 
 (define (text font s)
 
-  (define (pango-font-name font)
-    (debugf "FONT-NAME:~S:~S\n" (ly:font-name font) (ly:font-design-size font))
-    (debugf "FONT-FAMILY:~S:~S\n" (font-family font) (otf-name-mangling font (font-family font)))
-    (otf-name-mangling font (font-family font)))
-
-  (define (pango-font-size font)
-    (let* ((designsize (ly:font-design-size font))
-          (magnification (* (ly:font-magnification font)))
-          
-          ;;font-name: "GNU-LilyPond-feta-20"
-          ;;font-file-name: "feta20"
-          ;;pango-font-name: "lilypond-feta, regular 32"
-          ;;OPS:2.61
-          ;;scaling:29.7046771653543
-          ;;magnification:0.569055118110236
-          ;;design:20.0
-          
-          ;; ugh, experimental sizing
-          ;; where does factor ops come from?
-          ;; Hmm, design size: 26/20 
-          (ops 2.60)
-          
-          (scaling (* ops magnification designsize)))
-      (debugf "OPS:~S\n" ops)
-      (debugf "scaling:~S\n" scaling)
-      (debugf "magnification:~S\n" magnification)
-      (debugf "design:~S\n" designsize)
-      
-      scaling))
-
   (make <gnome-canvas-text>
     #:parent (canvas-root)
     ;; ugh, experimental placement corections
index db74518d9472732a96a2c4c31f933ba857360201..6899b747807313b59b3cd07de24952db04629977 100644 (file)
   (string-append (ly:numbers->string (list breapth width depth height))
                 " draw_box"))
 
-(define (glyph-string postscript-font-name x-y-named-glyphs)
+(define (glyph-string font postscript-font-name x-y-named-glyphs)
   (apply
    string-append
    (cons