Re: dots grob

2006-10-11 Thread Juergen Reuter

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


why not simply do

 string style =
 if (scm_is_symbol (scm_style))
   style = ly_symbol2string (scm_style);
 string idx =  dots.dot + style;




Because, historically, there is no difference in lily's behaviour between 
setting style to #'default and #'().  However, if you do not mind, I am 
also happy with the simpler solution.


Attached is a revised version that issues a proper warning if style is set 
to #'default or some other unsupported value, such that the dot is not 
found.


Should I apply it?

Greetings,
JuergenIndex: ChangeLog
===
RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v
retrieving revision 1.5395
diff -u -r1.5395 ChangeLog
--- ChangeLog   10 Oct 2006 13:38:32 -  1.5395
+++ ChangeLog   11 Oct 2006 10:03:50 -
@@ -1,3 +1,10 @@
+2006-10-10  Jürgen Reuter  [EMAIL PROTECTED]
+
+   * mf/parmesan-dots.mf (new), mf/parmesan-generic.mf,
+   ly/engraver-init.ly: Added vaticana-style augmentum dot glyph.
+
+   * lily/dots.cc: Added style property for dots.
+
 2006-10-10  Han-Wen Nienhuys  [EMAIL PROTECTED]
 
* scm/output-lib.scm (fingering::calc-text): use origin
Index: lily/dots.cc
===
RCS file: /cvsroot/lilypond/lilypond/lily/dots.cc,v
retrieving revision 1.79
diff -u -r1.79 dots.cc
--- lily/dots.cc11 Feb 2006 11:35:18 -  1.79
+++ lily/dots.cc11 Oct 2006 10:03:50 -
@@ -14,6 +14,7 @@
 #include lookup.hh
 #include staff-symbol-referencer.hh
 #include directional-element-interface.hh
+#include international.hh
 
 MAKE_SCHEME_CALLBACK (Dots, print, 1);
 SCM
@@ -26,7 +27,17 @@
 
   if (scm_is_number (c))
 {
-  Stencil d = Font_interface::get_default_font (sc)-find_by_name (string 
(dots.dot));
+  SCM scm_style = sc-get_property (style);
+  string style =;
+  if (scm_is_symbol (scm_style))
+   style = ly_symbol2string (scm_style);
+  string idx =  dots.dot + style;
+  Stencil d = Font_interface::get_default_font (sc)-find_by_name (idx);
+  if (d.is_empty ())
+   {
+ sc-warning (_f (dot `%s' not found, idx.c_str ()));
+ return SCM_EOL;
+   }
   Real dw = d.extent (X_AXIS).length ();
 
   /*
@@ -55,5 +66,6 @@
 
   /* properties */
   direction 
-  dot-count);
-
+  dot-count 
+  style 
+  );
Index: mf/parmesan-generic.mf
===
RCS file: /cvsroot/lilypond/lilypond/mf/parmesan-generic.mf,v
retrieving revision 1.10
diff -u -r1.10 parmesan-generic.mf
--- mf/parmesan-generic.mf  6 Jan 2006 09:13:23 -   1.10
+++ mf/parmesan-generic.mf  11 Oct 2006 10:03:50 -
@@ -33,6 +33,7 @@
input parmesan-flags;
input parmesan-timesig;
input parmesan-scripts;
+   input parmesan-dots;
 else:
 
 fi
Index: ly/engraver-init.ly
===
RCS file: /cvsroot/lilypond/lilypond/ly/engraver-init.ly,v
retrieving revision 1.309
diff -u -r1.309 engraver-init.ly
--- ly/engraver-init.ly 4 Oct 2006 10:32:26 -   1.309
+++ ly/engraver-init.ly 11 Oct 2006 10:03:50 -
@@ -765,6 +765,7 @@
   \override Custos #'style = #'vaticana
   \override Custos #'neutral-position = #3
   \override Custos #'neutral-direction = #DOWN
+  \override Dots #'style = #'vaticana
 }
 
 \context {
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: dots grob

2006-10-11 Thread Han-Wen Nienhuys

Juergen Reuter schreef:

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


why not simply do

 string style =
 if (scm_is_symbol (scm_style))
   style = ly_symbol2string (scm_style);
 string idx =  dots.dot + style;




Because, historically, there is no difference in lily's behaviour 
between setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.




+   input parmesan-dots;


I'm missing this file in the patch.


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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


Re: dots grob

2006-10-11 Thread Juergen Reuter

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:

Because, historically, there is no difference in lily's behaviour between 
setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.





Ok.


+   input parmesan-dots;


I'm missing this file in the patch.



Sorry, it's still the same one as in the previously sent mail (cvs diff -u 
unfortunately only spits out cvs diff: mf/parmesan-dots.mf is a new 
entry, no comparison available for new files).  It's attached to this 
mail once again.


Greetings,
Juergenfet_begingroup (dots);

save dot_diam;

3 dot_diam# = staff_space# - stafflinethickness#;
define_whole_blacker_pixels (dot_diam);

fet_beginchar (duration dot, dotvaticana);
pickup pencircle scaled dot_diam;

lft x0 = 0;
top y0 = vround (.5 dot_diam);

drawdot z0;

set_char_box (0, dot_diam#, .5 dot_diam#, .5 dot_diam#);
fet_endchar;

fet_endgroup (dots);
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: dots grob

2006-10-11 Thread Juergen Reuter

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


Juergen Reuter schreef:

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


why not simply do

 string style =
 if (scm_is_symbol (scm_style))
   style = ly_symbol2string (scm_style);
 string idx =  dots.dot + style;




Because, historically, there is no difference in lily's behaviour between 
setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.




By the way, it has not completely been removed.  The code related to the 
longa note bug reported last week by Ralph Little for example still 
contains some reminiscences to the old #'default feature.


Greetings,
Juergen


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


Re: dots grob

2006-10-11 Thread Han-Wen Nienhuys

Juergen Reuter schreef:

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:

Because, historically, there is no difference in lily's behaviour 
between setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.





Ok.


+input parmesan-dots;


I'm missing this file in the patch.



Sorry, it's still the same one as in the previously sent mail (cvs diff 
-u unfortunately only spits out cvs diff: mf/parmesan-dots.mf is a new 
entry, no comparison available for new files).  It's attached to this 
mail once again.


ok. Please apply.

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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


dots grob

2006-10-10 Thread Juergen Reuter

Hi,

may I apply attached patch in order to fix the size/shape of dots for 
ancient notation?  This patch adds a style property to the Dots grob 
and a new glyph to the parmesan font.


Greetings,
JuergenIndex: ChangeLog
===
RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v
retrieving revision 1.5395
diff -u -r1.5395 ChangeLog
--- ChangeLog   10 Oct 2006 13:38:32 -  1.5395
+++ ChangeLog   10 Oct 2006 17:29:40 -
@@ -1,3 +1,10 @@
+2006-10-10  Jürgen Reuter  [EMAIL PROTECTED]
+
+   * mf/parmesan-dots.mf (new), mf/parmesan-generic.mf,
+   ly/engraver-init.ly: Added vaticana-style augmentum dot glyph.
+
+   * lily/dots.cc: Added style property for dots.
+
 2006-10-10  Han-Wen Nienhuys  [EMAIL PROTECTED]
 
* scm/output-lib.scm (fingering::calc-text): use origin
Index: lily/dots.cc
===
RCS file: /cvsroot/lilypond/lilypond/lily/dots.cc,v
retrieving revision 1.79
diff -u -r1.79 dots.cc
--- lily/dots.cc11 Feb 2006 11:35:18 -  1.79
+++ lily/dots.cc10 Oct 2006 17:29:40 -
@@ -26,7 +26,16 @@
 
   if (scm_is_number (c))
 {
-  Stencil d = Font_interface::get_default_font (sc)-find_by_name (string 
(dots.dot));
+  SCM scm_style = sc-get_property (style);
+  string style;
+  if (scm_is_symbol (scm_style))
+   style = ly_symbol2string (scm_style);
+  else
+   style = default;
+
+  string idx =
+   (style == default) ? dot : string (dot) + style;
+  Stencil d = Font_interface::get_default_font (sc)-find_by_name (dots. 
+ idx);
   Real dw = d.extent (X_AXIS).length ();
 
   /*
@@ -55,5 +64,6 @@
 
   /* properties */
   direction 
-  dot-count);
-
+  dot-count 
+  style 
+  );
Index: mf/parmesan-generic.mf
===
RCS file: /cvsroot/lilypond/lilypond/mf/parmesan-generic.mf,v
retrieving revision 1.10
diff -u -r1.10 parmesan-generic.mf
--- mf/parmesan-generic.mf  6 Jan 2006 09:13:23 -   1.10
+++ mf/parmesan-generic.mf  10 Oct 2006 17:29:40 -
@@ -33,6 +33,7 @@
input parmesan-flags;
input parmesan-timesig;
input parmesan-scripts;
+   input parmesan-dots;
 else:
 
 fi
Index: ly/engraver-init.ly
===
RCS file: /cvsroot/lilypond/lilypond/ly/engraver-init.ly,v
retrieving revision 1.309
diff -u -r1.309 engraver-init.ly
--- ly/engraver-init.ly 4 Oct 2006 10:32:26 -   1.309
+++ ly/engraver-init.ly 10 Oct 2006 17:29:40 -
@@ -765,6 +765,7 @@
   \override Custos #'style = #'vaticana
   \override Custos #'neutral-position = #3
   \override Custos #'neutral-direction = #DOWN
+  \override Dots #'style = #'vaticana
 }
 
 \context {
fet_begingroup (dots);

save dot_diam;

3 dot_diam# = staff_space# - stafflinethickness#;
define_whole_blacker_pixels (dot_diam);

fet_beginchar (duration dot, dotvaticana);
pickup pencircle scaled dot_diam;

lft x0 = 0;
top y0 = vround (.5 dot_diam);

drawdot z0;

set_char_box (0, dot_diam#, .5 dot_diam#, .5 dot_diam#);
fet_endchar;

fet_endgroup (dots);
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: dots grob

2006-10-10 Thread Han-Wen Nienhuys

Juergen Reuter schreef:

Hi,

may I apply attached patch in order to fix the size/shape of dots for 
ancient notation?  This patch adds a style property to the Dots grob 
and a new glyph to the parmesan font.





   if (scm_is_number (c))
 {
-  Stencil d = Font_interface::get_default_font (sc)-find_by_name (string 
(dots.dot));
+  SCM scm_style = sc-get_property (style);
+  string style;
+  if (scm_is_symbol (scm_style))
+   style = ly_symbol2string (scm_style);
+  else
+   style = default;
+
+  string idx =
+   (style == default) ? dot : string (dot) + style;
+  Stencil d = Font_interface::get_default_font (sc)-find_by_name (dots. 
+ idx);
   Real dw = d.extent (X_AXIS).length ();


why not simply do

  string style =
  if (scm_is_symbol (scm_style))
style = ly_symbol2string (scm_style);
  string idx =  dots.dot + style;

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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