lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dots grob


From: Han-Wen Nienhuys
Subject: Re: dots grob
Date: Wed, 11 Oct 2006 00:07:33 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20061004)

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 - address@hidden - http://www.xs4all.nl/~hanwen

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]