]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/chord-name.cc
release: 1.3.53
[lilypond.git] / lily / chord-name.cc
index bb6fbbc1ea915bfa8620d030fc7d8b6ad4b6e938..0e8e1d094295bda6e27cc120283ccb73013aa861 100644 (file)
    "text"
    ("style" . "text")
  */
+
+/*
+  UGH. remove Dictionary< > and use Scheme_hash_table
+ */
 Molecule
 Chord_name::ly_word2molecule (SCM word) const
 {
-  Dictionary<SCM> option_dict;
+  /*
+    junkme.
+
+    Using the dict doesn't save code, since you have to compare
+    dict entries by hand later on anyway.
+    
+   */
+  Dictionary<SCM> option_dict; 
   if (gh_pair_p (word))
     {
       SCM options = gh_cdr (word);
@@ -36,8 +47,7 @@ Chord_name::ly_word2molecule (SCM word) const
       while (gh_pair_p (options))
         {
          SCM option = gh_car (options);
-         if (option != SCM_UNDEFINED && option != SCM_BOOL_F
-             && gh_pair_p (option))
+         if (gh_pair_p (option))
            {
              SCM key = gh_car (option);
              SCM val = gh_cdr (option);
@@ -53,8 +63,11 @@ Chord_name::ly_word2molecule (SCM word) const
          options = gh_cdr (options);
         }
     }
-  Real ex = lookup_l ()->text ("", "x", paper_l ()).extent
-           ()[Y_AXIS].length ();
+
+  /*
+    UGH. Should read from font metric structure.
+  */
+  Real ex = lookup_l ()->text ("", "x", paper_l ()).extent(Y_AXIS).length ();
   if (gh_string_p (word))
     {
       String w = ly_scm2string (word);
@@ -73,7 +86,7 @@ Chord_name::ly_word2molecule (SCM word) const
          && ly_scm2string (option_dict["type"]) == "super")
        {
          Real super_y = ex / 2;
-         //super_y += -acc.extent ()[Y_AXIS][MIN];
+         //super_y += -acc.extent (Y_AXIS)[MIN];
          offset = Offset (0, super_y);
          if (!size)
            size = -2;