]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/framework-ps.scm (output-preview-framework): bugfix.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Feb 2005 22:58:01 +0000 (22:58 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Feb 2005 22:58:01 +0000 (22:58 +0000)
* ly/chord-modifiers-init.ly (ignatzekExceptionMusic): use unicode
o/ for chord modifier..

* lily/general-scheme.cc (LY_DEFINE): new function ly:wide-char->utf-8.

ChangeLog
lily/general-scheme.cc
lily/lily-guile.cc
ly/chord-modifiers-init.ly
scm/framework-ps.scm

index 7ed348e2e262c4ca6eda481f7cdba8d83d570eea..97dc6df48afbd8e1a12d09bd6af4234a479bf895 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2005-02-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * scm/framework-ps.scm (output-preview-framework): bugfix.
+
+       * ly/chord-modifiers-init.ly (ignatzekExceptionMusic): use unicode
+       o/ for chord modifier..
+
+       * lily/general-scheme.cc (LY_DEFINE): new function ly:wide-char->utf-8.
+
        * lily/drum-note-performer.cc:  remove unused (thanks Michael
        Welsh Duggan). 
 
index 58a608c6839a79973a8157abe71e1aac963a2df3..b9fcf2540c594b1b9c26ddeb6a0dba9c43692288 100644 (file)
@@ -201,3 +201,22 @@ LY_DEFINE (ly_output_formats, "ly:output-formats",
 
   return lst;
 }
+
+LY_DEFINE(ly_wchar_to_utf_8, "ly:wide-char->utf-8",
+         1, 0, 0, (SCM wc),
+         "Encode the Unicode codepoint @var{wc} as UTF-8")
+{
+  char buf[100];
+
+  SCM_ASSERT_TYPE(scm_is_integer (wc), wc, SCM_ARG1, __FUNCTION__, "integer");
+  wchar_t wide_char = (wchar_t) scm_to_int (wc);
+
+  mbstate_t state;
+  memset (&state, '\0', sizeof (state));
+  memset (buf, '\0', sizeof (buf));
+
+  wcrtomb (buf, wide_char, &state);
+  
+  return scm_makfrom0str (buf);
+}
+         
index 50bb49e841e9eb0a395f14e9e8940fa3a5cff491..c8692d0a74d0849e071a814bea71dc7fbcafaf99 100644 (file)
@@ -742,3 +742,4 @@ ly_hash2alist (SCM tab)
   SCM func = ly_lily_module_constant ("hash-table->alist");
   return scm_call_1 (func, tab);
 }
+
index 863d4a996fc6094015eb352f60c1d5b8c97a1b70..4054f532d3b4e1cd38812d24c8428c1b5a95408a 100644 (file)
@@ -2,14 +2,36 @@
 
 chordmodifiers = #default-chord-modifier-list
 
-whiteTriangleMarkup = \markup { \override #'(font-encoding . TeX-math) \char #77 } 
 
-blackTriangleMarkup = \markup { \override #'(font-encoding . TeX-math) \char #78 }
+whiteTriangleMarkup = \markup {
+  %%  394 capital delta
+  %% #(ly:export (ly:wide-char->utf-8 #x0394))
+
+  %% up pointing triangle
+  %% #(ly:export (ly:wide-char->utf-8 #x25B3))
+  
+  FIXME
+
+  %% \override #'(font-encoding . TeX-math) \char #77
+
+} 
+
+blackTriangleMarkup = \markup {
+
+  %% black up pointing triangle
+  %% #(ly:export (ly:wide-char->utf-8 #x25B2))
+  FIXME
+  
+  %% \override #'(font-encoding . TeX-math) \char #78 }
+}
 
 ignatzekExceptionMusic = {
        <c e gis>1-\markup { "+" }
        <c es ges>-\markup { \super "o" } % should be $\circ$ ?
-       <c es ges bes>-\markup { \super \combine "o" "/" }
+       <c es ges bes>-\markup {
+         %%  f8 o with slash.
+         #(ly:export (ly:wide-char->utf-8 #x00f8))
+       }
        <c es ges beses>-\markup { \super  "o7" }
 }
 
index ed57823b4300dfec2b5fb4cfb633de2362ca9f2d..1c26d8a863964f84d9942909a5fc87d74f790ccc 100644 (file)
 
 
 (define-public (output-preview-framework basename book scopes fields )
-  (let* ((outputter  (ly:make-paper-outputter filename
-                                             "ps"))
-        (paper (ly:paper-book-paper book))
+  (let* ((paper (ly:paper-book-paper book))
         (systems (ly:paper-book-systems book))
-        (scale  (ly:output-def-lookup paper 'outputscale ))
+        (scale  (ly:output-def-lookup paper 'outputscale))
         (titles (take-while ly:paper-system-title? systems))
         (non-title (find (lambda (x)
                            (not (ly:paper-system-title? x))) systems))
          (stack-stencils Y DOWN 0.0
                          (map ly:paper-system-stencil
                               (append titles (list non-title))))))
-    (dump-stencil-as-EPS paper dump-me basename #t)))
+    (dump-stencil-as-EPS paper dump-me
+                        (format "~a.preview" basename)
+                        #t)))