Am 27.11.2010 21:12, schrieb Carl Sorensen:
Marc,

Do you have a regtest file that uses the custom fret label?
Now I do ;-)

Thanks,

Marc

>From a34ec51095cdc2f5e06e847c85fcd86b95ae7b1e Mon Sep 17 00:00:00 2001
From: Marc Hohl <m...@hohlart.de>
Date: Tue, 23 Nov 2010 21:18:25 +0100
Subject: [PATCH] tablature: provide custom fret labels

---
 scm/tablature.scm |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/scm/tablature.scm b/scm/tablature.scm
index 419f93c..1aa766d 100644
--- a/scm/tablature.scm
+++ b/scm/tablature.scm
@@ -255,3 +255,16 @@
   (let ((width (ly:stem-tremolo::calc-width grob))
        (staff-space (ly:staff-symbol-staff-space grob)))
     (/ width staff-space)))
+
+;; define custom fret label as markup
+(define-markup-command (customFretLabel
+                                layout props fret-label) (string?)
+  #:category music
+  "Draw a custom tab fret label."
+
+  (interpret-markup layout props
+                    (markup #:vcenter fret-label)))
+
+;; use it for custom fret labels
+(define-public ((tab-note-head::print-custom-fret-label fret) grob)
+  (grob-interpret-markup grob (make-customFretLabel-markup fret)))
-- 
1.7.0.4

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to