]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/context-def.cc (path_to_acceptable_context): bugfix, depth
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 3 May 2005 22:22:56 +0000 (22:22 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 3 May 2005 22:22:56 +0000 (22:22 +0000)
should be taken without child context.

* ly/chord-modifiers-init.ly (blackTriangleMarkup): use it.

* scm/define-markup-commands.scm (triangle): new command, as
robust replacement for unicode Delta/Triangle.

ChangeLog
VERSION
buildscripts/ps-embed-cff.py [deleted file]
lily/context-def.cc
lily/lookup.cc
ly/chord-modifiers-init.ly
ly/engraver-init.ly
ps/music-drawing-routines.ps
scm/define-markup-commands.scm
scm/output-ps.scm
scm/output-tex.scm

index ffd2f2b408e8307447a8a6caed2d3c4a8bbb708a..10870c2944bc3cba86f9c02289d4037a0613ffb8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
+2005-05-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/context-def.cc (path_to_acceptable_context): bugfix, depth
+       should be taken without child context.
+
+       * ly/chord-modifiers-init.ly (blackTriangleMarkup): use it.
+
+       * scm/define-markup-commands.scm (triangle): new command, as
+       robust replacement for unicode Delta/Triangle.
+
 2005-05-03  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * ps/music-drawing-routines.ps: add fillp argument.
+
+       * lily/lookup.cc (round_filled_polygon): polygon takes filled? argument
+
        * lily/font-config.cc (init_fontconfig): don't add cff/
 
        * VERSION (PACKAGE_NAME): release 2.5.22
diff --git a/VERSION b/VERSION
index bcd4ae6864e2348f986c7e053a07beaf6574b745..8ec81acb43f11ba9c54ec1f9eeeb6de844097d0c 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=5
-PATCH_LEVEL=22
+PATCH_LEVEL=23
 MY_PATCH_LEVEL=
 
diff --git a/buildscripts/ps-embed-cff.py b/buildscripts/ps-embed-cff.py
deleted file mode 100644 (file)
index 8eabaed..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!@PYTHON@
-import sys
-
-file  = sys.argv[1]
-font_set_name  = sys.argv[2]
-output = sys.argv[3]
-body = open (file).read() 
-body_length  = len (body)
-version = '0'
-binary_data = "/%(font_set_name)s %(body_length)d StartData "  % vars() \
-  + body
-binary_length = len (binary_data)
-
-header = r"""%%%%BeginResource: font %(font_set_name)s
-%%!PS-Adobe-3.0 Resource-FontSet
-%%%%DocumentNeededResources: ProcSet (FontSetInit)
-%%%%Title: (FontSet/%(font_set_name)s)
-%%%%Version: %(version)s
-%%%%EndComments
-%%%%IncludeResource: ProcSet (FontSetInit)
-%%%%BeginResource: FontSet (%(font_set_name)s)
-/FontSetInit /ProcSet findresource begin
-%%%%BeginData: %(binary_length)d Binary Bytes
-""" % vars()
-
-
-footer = """\n%%%%EndData
-%%%%EndResource
-%%%%EOF
-%%%%EndResource\n""" % vars()
-
-fo = open (output,'w')
-fo.write (header)
-fo.write (binary_data)
-fo.write (footer)
index a17eb49954d38e43a249e0be5d2ad48982627d3c..858ef35ff94264b337e1031e43604cf9d88d78f6 100644 (file)
@@ -227,12 +227,9 @@ Context_def::path_to_acceptable_context (SCM type_sym, Output_def *odef) const
        = g->path_to_acceptable_context (type_sym, odef);
       if (result.size () && result.size () < best_depth)
        {
+         best_depth = result.size ();
          result.insert (g, 0);
          best_result = result;
-
-         /* this following line was added in 1.9.3, but hsould've been
-            there all along... Let's hope it doesn't cause nightmares.  */
-         best_depth = result.size ();
        }
     }
 
index 57d668fe7313d3eb975fad01d5222a824b1f46de..567cb9dd6d8f4e9d3748bc063e3cb3437449dda8 100644 (file)
@@ -308,6 +308,7 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
   SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
                                ly_quote_scm (shrinked_points_scm),
                                scm_make_real (blotdiameter),
+                               SCM_BOOL_T,
                                SCM_UNDEFINED);
 
   Stencil polygon = Stencil (box, polygon_scm);
index e3ce5773827e9c47b05bc51c3e61a8c5217f60b7..ff78e3daca6674dd309ff348ae40dd1b89faba0a 100644 (file)
@@ -4,8 +4,9 @@ chordmodifiers = #default-chord-modifier-list
 
 
 whiteTriangleMarkup = \markup {
+  \triangle ##f
   %%  394 capital delta
-  #(ly:export (ly:wide-char->utf-8 #x0394))
+  %#(ly:export (ly:wide-char->utf-8 #x0394))
 
   %% 2206 : delta from the symbol font.
   %   #(ly:export (ly:wide-char->utf-8 #x2206))
@@ -17,9 +18,10 @@ whiteTriangleMarkup = \markup {
 } 
 
 blackTriangleMarkup = \markup {
+  \triangle ##t
 
   %% black up pointing triangle
-  #(ly:export (ly:wide-char->utf-8 #x25B2))
+%  #(ly:export (ly:wide-char->utf-8 #x25B2))
 }
 
 ignatzekExceptionMusic = {
index f0586242110051098dd51d7e36f4809596a0608c..4c71a445c4f12dbae4b88e02b20ec98dd84159f2 100644 (file)
@@ -402,7 +402,7 @@ AncientRemoveEmptyStaffContext = \context {
 
 \context {
   \type Score_engraver
-  \name Score
+  \name "Score"
 
   \description "This is the top level notation context.  No
     other context can contain a @code{Score} context.  This context
@@ -435,12 +435,12 @@ AncientRemoveEmptyStaffContext = \context {
 
   \defaultchild "Staff"
   \accepts "Staff"
-  \accepts "TabStaff"
+  \accepts "RhythmicStaff"
+%{  \accepts "TabStaff"
   \accepts "VaticanaStaff"
   \accepts "GregorianTranscriptionStaff"
   \accepts "MensuralStaff"
   \accepts "StaffGroup"
-  \accepts "RhythmicStaff"
   \accepts "DrumStaff"
   \accepts "Lyrics"
   \accepts "ChordNames"
@@ -450,7 +450,7 @@ AncientRemoveEmptyStaffContext = \context {
   \accepts "Devnull"
   \accepts "NoteNames"
   \accepts "FiguredBass"
-
+%}
   soloText = #"Solo"
   soloIIText = #"Solo II"
   aDueText = #"a2"
index 53dc007fc203865aa17e193a8befa7435565423d..a2e74c35bfc238f5f4b4fd37985bee978982c8b9 100644 (file)
@@ -157,8 +157,9 @@ bind def
        } ifelse
 } bind def
 
-/draw_polygon % x(n) y(n) x(n-1) y(n-1) ... x(1) y(1) n blot
+/draw_polygon % x(n) y(n) x(n-1) y(n-1) ... x(1) y(1) n blot fill
 {
+       /fillp exch def
        /blot exch def
 
        0 setlinecap
@@ -168,12 +169,12 @@ bind def
        /points exch def
        2 copy
        moveto
-       1 1 points {pop lineto} for
-       currentdict /testing known {
-               %% outline only, for testing:
-               stroke
+       1 1 points { pop lineto } for
+       closepath 
+       fillp {
+               gsave stroke grestore fill
        }{
-               closepath gsave stroke grestore fill
+               stroke
        } ifelse
 } bind def
 
index 09364bcc7430b38f24dcb68b3c2c2e98ecdb8ee3..89f8fee98b2548985ca36a29b368151aa0e9703b 100644 (file)
 optionally filled."
   (make-circle-stencil radius thickness fill))
 
+(def-markup-command (triangle layout props filled) (boolean?)
+  "A triangle, filled or not"
+  (let*
+      ((th (chain-assoc-get 'thickness props  0.1))
+       (size (chain-assoc-get 'font-size props 0))
+       (ex (* (magstep size)
+             0.8
+             (chain-assoc-get 'baseline-skip props 2))))
+
+    (ly:make-stencil
+     `(polygon '(0.0 0.0
+                    ,ex 0.0
+                    ,(* 0.5 ex)
+                    ,(* 0.86 ex))
+          ,th
+          ,filled)
+
+     (cons 0 ex)
+     (cons 0 (* .86 ex))
+     )))
+
 (def-markup-command (circle layout props arg) (markup?)
   "Draw a circle around @var{arg}.  Use @code{thickness},
 @code{circle-padding} and @code{font-size} properties to determine line
index 8789ab096ae92479de175aa0f76c9cc3081a0e21..7d5ed56e9acb4bd3e3c92e45d915ac4b33167555 100644 (file)
   (string-append 
    (ly:number->string x) " " (ly:number->string y) " { " s " } place-box\n"))
 
-(define (polygon points blotdiameter)
+(define (polygon points blotdiameter filled?)
   (string-append
    (ly:numbers->string points) " "
    (ly:number->string (/ (length points) 2)) " "
    (ly:number->string blotdiameter)
+   (if filled? " true " " false ")
    " draw_polygon"))
 
 (define (repeat-slash wid slope thick)
index 960d62d439220f0b1f192489c28657529a7158bf..0d60bd50a1f4c13c798bd9735fb2be819d8ad5d8 100644 (file)
 (define (resetcolor)
   (string-append "\\color[rgb]{0,0,0}\n"))
 
-(define (polygon points blotdiameter)
-  (embedded-ps (list 'polygon `(quote ,points) blotdiameter)))
+(define (polygon points blotdiameter fill)
+  (embedded-ps (list 'polygon `(quote ,points) blotdiameter fill)))
 
 (define (draw-line thick fx fy tx ty)
   (embedded-ps (list 'draw-line thick fx fy tx ty)))