]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.112.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 29 Nov 2000 16:09:39 +0000 (17:09 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 29 Nov 2000 16:09:39 +0000 (17:09 +0100)
1.3.112.jcn3
============

* Added stems to font for use in markup text.

* Fixed markup text kerning, see input/test/metronome.ly.
  (Ugh, only feasible if kerning is first markup -- markup text should be revised.)

CHANGES
VERSION
input/test/markup.ly
input/test/metronome.ly [new file with mode: 0644]
lily/text-item.cc
mf/feta-banier.mf
scm/chord-name.scm
scm/font.scm

diff --git a/CHANGES b/CHANGES
index f1dbe42f42efba8afe0384163063eafc43748543..27b8019a268a5a9648eefc372c4f8502a17bbd05 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+1.3.112.jcn3
+============
+
+* Added stems to font for use in markup text.
+
+* Fixed markup text kerning, see input/test/metronome.ly.
+  (Ugh, only feasible if kerning is first markup -- markup text should be revised.)
+
 1.3.112.jcn2
 ============
 
diff --git a/VERSION b/VERSION
index 97c76d3de2609b7b5ad3b6b6434c4049c34e52d2..c9d4f024df7c9b925cab83b5822bc6158d35512c 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=112
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index d6d882f88d7289abf3d5d58e89a9f83cbbab540f..4b35fea469a4fd907b02d7a8ba4005a8a7f52ed3 100644 (file)
                  (italic "three"))
                f-\textscript #'(finger "3")
                g-\textscript #'(music (named "noteheads-2" "flags-u3"))
-       }
+               
+               b-#'(rows "a" ((kern . 3) ((raise . 2) "b")) "c")
+               c-#'(rows "1" ((kern . -3) ((raise . -2) "2")) "3")
+               
+               }
        \paper{
                linewidth = -1.\mm;
                \translator{
diff --git a/input/test/metronome.ly b/input/test/metronome.ly
new file mode 100644 (file)
index 0000000..197f5ad
--- /dev/null
@@ -0,0 +1,21 @@
+
+\version "1.3.110";
+
+%
+% Test new font selection and scm text markup
+%
+
+\score{
+       \notes\relative c''{
+               % put me in an engraver
+               a1-#'(rows (music "noteheads-2" ((kern . -0.1) "flags-stem") ((kern . -0.1) ((raise . 3.5) "flags-u3"))) " = 64")
+               }
+       \paper{
+               linewidth = -1.\mm;
+               \translator{
+                       \ScoreContext
+                       TextScript \override #'font-shape = #'upright
+                       TextScript \override #'direction = #1
+               }
+       }
+}
index 34c710db9dbc055a39eabcf16b0c6e1bfabf6893..ef256e5b7a1aa8892bd1b68332657a48cedb5b38 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 /*
-  TODO:
+  FIXME:
 
   rewrite routines and syntax to be like
 
@@ -128,13 +128,6 @@ Molecule
 Text_item::markup_sentence2molecule (Grob *me, SCM markup_sentence,
                                     SCM alist_chain)
 {
-  /*
-    FIXME
-
-    huh?
-   */
-  // return Molecule ();
-  
   SCM sheet = me->paper_l ()->style_sheet_;
   SCM f = gh_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
   
@@ -159,17 +152,32 @@ Text_item::markup_sentence2molecule (Grob *me, SCM markup_sentence,
   if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
     raise = gh_scm2double (gh_cdr (r)) * staff_space;
 
+#if 0
   Offset o (align == X_AXIS ? kern : 0,
            (align == Y_AXIS ? - kern : 0) + raise);
-
+#else
+  Offset o (0, (align == Y_AXIS ? - kern : 0) + raise);
+#endif
   Molecule mol;
   while (gh_pair_p (sentence))
     {
+      /* Ugh: this (kerning) only works if 'kern' is the first modifier of a
+        markup.  I guess the only solution is to rewrite markup definition,
+        see above. */
       Molecule m = text2molecule (me, gh_car (sentence), p);
+      Real m_kern = 0;
+      SCM m_p = SCM_EOL;
+      if (gh_pair_p (gh_car (sentence)))
+       m_p = gh_cons  (gh_call2 (f, sheet, gh_caar (sentence)), alist_chain);
+      SCM m_k = ly_assoc_chain (ly_symbol2scm ("kern"), m_p);
+      if (gh_pair_p (m_k) && gh_number_p (gh_cdr (m_k)))
+       m_kern = gh_scm2double (gh_cdr (m_k)) * staff_space;
+
       if (!m.empty_b ())
        {
          m.translate (o);
-         mol.add_at_edge (align, align == X_AXIS ? RIGHT : DOWN, m, 0);
+         mol.add_at_edge (align, align == X_AXIS ? RIGHT : DOWN, m, m_kern);
        }
       sentence = gh_cdr (sentence);
     }
index 246f599bfe3e29c6be75e60e1354b28aea5dafe5..c384f98fc6c721ba2377b6063c4a2dcf1ea45138 100644 (file)
@@ -432,4 +432,19 @@ fet_beginchar("grace dash (down)", "dgrace", "dgracedash")
        y_mirror_char;
 fet_endchar;
 
+% ustem?
+fet_beginchar("stem (up)", "stem", "stem")
+       set_char_box(stemthickness#/2, 0, 3.5staff_space#, stemthickness#/2);
+       pickup pencircle scaled stemthickness;
+       draw (0, 0) .. (0, 3.5staff_space);
+fet_endchar;
+
+% do we want this?
+fet_beginchar("stem (down)", "dstem", "dstem")
+       set_char_box(stemthickness#/2, -3.5staff_space#, 0, stemthickness#/2);
+       pickup pencircle scaled stemthickness;
+       draw (0, 0) .. (-3.5staff_space, 0);
+fet_endchar;
+
+
 fet_endgroup("flags");
index d3ad48943c4eda44ced41af7557369f3dcdec9fc..49604d17bbfaf11fed3f89deab0d33b86ab9693c 100644 (file)
@@ -96,8 +96,8 @@
         (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . ("m(maj7)"))
         ;jazz: the delta, see jazz-chords.ly
         ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((font-family . math) "N"))
-        ;; slashed o
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((raise . 0.5) ((kern . -0.5) ((font-relative-size . -3) "/"))) "7")) ; slashed o
+        ;; ugh, kludge slashed o
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((kern . -0.85) ((raise . 0.57) ((font-relative-size . -3) "/"))) "7")) ; slashed o
         (((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7"))
         (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
         (((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (rows "7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
index fec9446ef5d8587dfb408046378fb905972a1127..2682e600114001393d73f5cf581a892abe94c1b0 100644 (file)
      . ((rows . ((align . 0)))
        (lines . ((align . 1)))
        (roman . ((font-family . roman)))
-       (music . ((font-family . music) (font-shape . upright)))
+       (music . ((font-family . music) (font-shape . upright) (lookup . name)))
        (finger . ((font-style . finger)))
        (bold . ((font-series . bold)))
        (italic . ((font-shape . italic)))