+*-
*-midi.ly
*-systems.tex
*-systems.texi
+*.600pk
*.afm
*.aux
*.eps
+*.gcda
+*.gcno
+*.gcov
*.log
*.midi
*.orig
+*.patch
+*.pats
*.pdf
*.ps
*.pyc
*.rej
+*.signature
*.svg
*.tfm
*~
+*~*
+.\#*
.dotest
.gdbinit
.htaccess
+/*.html
+/*.ly
+/*.png
/.sconf_temp
/.sconsign.dblite
/GNUmakefile
+/local.make
/scons.cache
/x
?.*
INSTALL.txt
TAGS
\#*
+\#.*
a.out
aclocal.m4
autom4te.cache
out-scons
tags
test-output-distance
-*.gcov
-*.gcda
-*.gcno
-*.600pk
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond.tely
+@c
+@c Translation of GIT committish: 829be449be664ea765ed43f5d56b50b41e43b397
+@c
+@c When revising a translation, copy the HEAD committish of the
+@c version that you are working on. Use
+@c
+@c git-rev-list HEAD | head -1
+@c
+@c to discover that.
@c TODO:
@c * more details about running lilypond; error messages,
@end ignore
+
+@item Alterations (such as a sharp and flat) may now be arbitrary
+fractions. This allows some forms of microtonal music. For example,
+Turkish makam music uses 1/9th tone alterations.
+
+@lilypondfile{makam.ly}
+
+
+
@item Tie directions may be set with @code{^~} and @code{_~}
@item Tablature now supports harmonics and slides,
These instructions can be found when you unpack lilypond, as
@file{lilypond-x.y.z/INSTALL.txt}. They are also available on the web
at
-@uref{http://lilypond.org/doc/v2.1/Documentation/topdocs/out-www/INSTALL.html}.
+@uref{http://lilypond.org/doc/v2.10/Documentation/topdocs/INSTALL.html}.
@section Documentation
The documentation is available online at
-@uref{http://www.lilypond.org/doc/}.
+@uref{http://lilypond.org/doc/}.
You can also build it locally: follow the instructions under `Building
documentation' in the installation instructions.
and @code{format-mark-circle-barnumbers} to get bar numbers instead of
incremented numbers or letters.
+Other styles of rehearsal mark can be specified manually
+
+@example
+\mark "A1"
+@end example
+
+@noindent
+@code{Score.markFormatter} does not affect marks specified in this manner.
+However, it is possible to apply a @code{\markup} to the string.
+
+@example
+\mark \markup@{ \box A1 @}
+@end example
+
@cindex segno
@cindex coda
@cindex D.S al Fine
@seealso
+This manual: @ref{Text marks}.
+
Program reference: @internalsref{RehearsalMark}.
Init files: @file{scm/@/translation@/-functions@/.scm} contains the
c8 c4. } \\ { c2 c2 } >>
@end lilypond
+@noindent
+@code{merge-differently-headed} and @code{merge-differently-dotted}
+only apply to opposing stem directions (ie. Voice 1 & 2).
+
LilyPond also vertically shifts rests that are opposite of a stem,
for example
@cindex accidentals
-Use the @code{style} property of grob @internalsref{Accidental} to
-select ancient accidentals. Supported styles are
-@code{mensural}, @code{vaticana}, @code{hufnagel}, and @code{medicaea}.
+Use the @code{glyph-name-alist} property of grob
+@internalsref{Accidental} and @internalsref{KeySignature} to select
+ancient accidentals.
@lilypond[quote,ragged-right,staffsize=26]
\score {
@inputfileref{input/@/test,ancient@/-accidentals@/.ly}.
Similarly to local accidentals, the style of the key signature can be
-controlled by the @code{style} property of the
+controlled by the @code{glyph-name-alist} property of the
@internalsref{KeySignature} grob.
@seealso
@item
The
-@emph{@ref{Command index}}
+@emph{@ref{LilyPond command index}}
is an index of all LilyPond @code{\commands}.
@item
* Integrating LaTeX and music::
* Integrating Texinfo and music::
* Integrating HTML and music::
-* Integrating DocBook and music::
+* Integrating DocBook and music::
* Music fragment options::
* Invoking lilypond-book::
* Filename extensions::
* Many quotes of a large score::
+* Inserting LilyPond output into OpenOffice.org::
* Inserting LilyPond output into other programs::
@end menu
...
@end example
+@itemx --padding=@var{amount}
+Pad EPS boxes by this much. @var{amount} is measured in milimeters,
+and is 3.0 by default. This option should be used if the lines of
+music stick out of the right margin.
+
+The width of a tightly clipped systems can vary, due to notation
+elements that stick into the left margin, such as bar numbers and
+instrument names. This option will shorten each line and move each
+line to the right by the same amount.
+
+
@item -P @var{process}
@itemx --process=@var{command}
Process LilyPond snippets using @var{command}. The default command is
the clip systems feature, see @ref{Extracting fragments of notation}.
-@ignore
-@n ode Inserting LilyPond output into OpenOffice.org
-@s ection Inserting LilyPond output into OpenOffice.org
+@node Inserting LilyPond output into OpenOffice.org
+@section Inserting LilyPond output into OpenOffice.org
-@c index OpenOffice.org
+@cindex OpenOffice.org
LilyPond notation can be added to OpenOffice.org with
-@u ref{http://@/ooolilypond@/.sourceforge@/.net@/,OOoLilyPond}
-
-@end ignore
+@uref{http://@/ooolilypond@/.sourceforge@/.net@/,OOoLilyPond}
@node Inserting LilyPond output into other programs
@c -*- coding: utf-8; mode: texinfo; -*-
@c This file is part of lilypond.tely
+@c
+@c Translation of GIT committish: <FILL-IN-HEAD-COMMITTISH>
+@c
+@c When revising a translation, copy the HEAD committish of the
+@c version that you are working on. Use
+@c
+@c git-rev-list HEAD | head -1
+@c
+@c to discover that.
@c TODO:
@c * more details about running lilypond; error messages,
@end lilypond
@emph{Warning:} Every piece of LilyPond input needs to have
-@{curly braces@} placed around the input. Don't forget them!
+@{curly braces@} placed around the input. The braces should be
+also be surrounded by a space unless
+they are at the beginning or end of a line to avoid ambiguities. These
+may be omitted in examples in this manual, but don't forget them in
+your own music!
@cindex Case sensitive
In addition, LilyPond input is case sensitive. @code{ @{ c d e @} } is
@section Second steps
@emph{Remember:} Every piece of LilyPond input needs to
-have @{curly braces@} placed
-around the input. For the rest of this manual, most examples will
+have @{curly braces@} placed around the input.
+The braces should be surrounded by a space unless
+they are at the beginning or end of a line to avoid ambiguities.
+For the rest of this manual, most examples will
omit these braces, but don't forget them in your own music!
@c will be removed once the tutorial either explains \relative or
test:
## no aa-scaling, no PDF
$(MAKE) -C input/regression/ out=test LILYPOND_BOOK_LILYPOND_FLAGS="--backend=eps --formats=ps,png $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= out-test/collated-files.html
- @find input ly -name '*.ly' |grep -v 'out.*/' | xargs grep '\\version' -L | sed 's/^/**** Missing version: /g'
+ @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g'
-Release 2.10
+Release 2.11
************
Benjamin Drung
Cameron Horsburgh
Carl Sorensen
+Christian Hitz
David Bobroff
Eduardo Vieira
Jay Anderson
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=11
-PATCH_LEVEL=6
+PATCH_LEVEL=7
MY_PATCH_LEVEL=
if depfile_nm:
write_deps (open (depfile_nm, 'wb'), deps,
[base + '.log', base + '.dvi', base + '.pfa',
- base + '.pfb', texfile_nm])
+ depfile_nm,
+ base + '.pfb', texfile_nm])
#include "std-string.hh"
-#include "std-string.hh"
-
/**
Rational numbers. Included is support for + and - infinity.
*/
--- /dev/null
+#ifndef __YAFFUT_PARAMETERS_H__
+#define __YAFFUT_PARAMETERS_H__
+
+#include "yaffut.hh"
+
+namespace yaffut {
+template <typename Suite, typename ParameterOne, typename Case>
+struct TestOne: public ITest, public Suite
+{
+ ParameterOne const parameter_one_;
+ //static Registrator<Suite, Case> s_Registrator;
+ TestOne(ParameterOne p)
+ : Suite(p)
+ , parameter_one_ (p)
+ {
+ Registrator<Suite, Case>* r = &Test<Suite, Case>::s_Registrator;
+ r = 0;
+ }
+};
+
+#define TEST_STRING(Suite, Case, String)\
+ namespace { \
+ struct Case: public yaffut::TestOne<Suite, std::string, Case>{ Case(); }; \
+ } \
+ template struct yaffut::TestOne<Suite, std::string, Case>; Case::Case() \
+ : yaffut::TestOne<Suite, std::string, Case> (String)
+
+}
+
+#endif // __YAFFUT_PARAMETERS_H__
--- /dev/null
+// Copyright 2006 Rutger E.W. van Beusekom.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef __YAFFUT_H__
+#define __YAFFUT_H__
+
+#include <cxxabi.h>
+
+#include <cmath>
+#include <iostream>
+#include <map>
+#include <memory>
+#include <sstream>
+#include <stdexcept>
+
+#define YAFFUT_STRINGIZE(x) YAFFUT_STRINGIZE_(x)
+#define YAFFUT_STRINGIZE_(x) #x
+
+#define __YAFFUT_AT__ __FILE__ ":" YAFFUT_STRINGIZE(__LINE__)": "
+#ifndef __AT__
+#define __AT__ __YAFFUT_AT__
+#endif
+
+#define YAFFUT_EQUAL(e,a) \
+ yaffut::equal (e ,a , __YAFFUT_AT__, "EQUAL(" #e " == " #a ") failed ")
+#ifndef EQUAL
+#define EQUAL YAFFUT_EQUAL
+#endif
+
+#define YAFFUT_UNEQUAL(e,a) \
+ yaffut::unequal (e, a, __YAFFUT_AT__, "UNEQUAL(" #e " != " #a ") failed ")
+#ifndef UNEQUAL
+#define UNEQUAL YAFFUT_UNEQUAL
+#endif
+
+#define YAFFUT_CHECK(e) \
+ yaffut::check (e, __YAFFUT_AT__, "CHECK(" #e ") failed ")
+#ifndef CHECK
+#define CHECK YAFFUT_CHECK
+#endif
+
+#define YAFFUT_FAIL(s) yaffut::fail (s, __YAFFUT_AT__);
+#ifndef FAIL
+#define FAIL YAFFUT_FAIL
+#endif
+
+#define YAFFUT_ASSERT_THROW(s, e) \
+ try \
+ { \
+ s; \
+ throw yaffut::failure (__YAFFUT_AT__, #s " failed to throw"); \
+ } \
+ catch(const e&){}
+#ifndef ASSERT_THROW
+#define ASSERT_THROW YAFFUT_ASSERT_THROW
+#endif
+
+namespace yaffut {
+
+template <typename T>
+std::string demangle()
+{
+ size_t sz;
+ int status;
+ char* ptr = abi::__cxa_demangle(typeid(T).name(), 0, &sz, &status);
+ std::string name(ptr ? ptr : "", ptr ? strlen(ptr) : 0);
+ if(ptr){ free(ptr); }
+ std::string::size_type pos = name.rfind("::");
+ if(pos != std::string::npos)
+ {
+ name = name.substr(pos + 2);
+ }
+ return name;
+}
+
+struct ITest
+{
+ virtual ~ITest(){}
+};
+
+class Factory
+{
+public:
+ typedef ITest* (*Create_t) ();
+private:
+ typedef std::map<std::string, Create_t> Tests_t;
+ Tests_t m_Tests;
+ size_t m_fail;
+ size_t m_pass;
+private:
+ Factory(){}
+ ~Factory(){}
+ static bool EqualsSuiteName (std::string const &name, std::string const& s)
+ {
+ return name.find (':') >= name.length () - 2
+ && s.substr (0, name.length ()) == name;
+ }
+public:
+ static Factory& Instance()
+ {
+ static Factory instance;
+ return instance;
+ }
+ void Register(const std::string& name, Create_t create)
+ {
+ m_Tests[name] = create;
+ }
+ size_t Fail () { return m_fail; }
+ void List(const std::string& name)
+ {
+ for(Tests_t::const_iterator it = m_Tests.begin(); it != m_Tests.end(); ++it)
+ {
+ if(name.empty () || it->first == name
+ || EqualsSuiteName (name, it->first))
+ std::cout << it->first << std::endl;
+ }
+ }
+ void Run(const std::string& name)
+ {
+ for(Tests_t::const_iterator it = m_Tests.begin(); it != m_Tests.end(); ++it)
+ {
+ if("All" == name || it->first == name
+ || EqualsSuiteName (name, it->first))
+ {
+ try
+ {
+ std::cout << std::endl << it->first << ' ' << std::flush;
+ {
+ std::auto_ptr<ITest> test(it->second());
+ }
+ std::cout << "[OK]" << std::flush;
+ ++m_pass;
+ }
+ catch(const std::exception& e)
+ {
+ std::cout << "[FAIL]\n" << e.what() << std::flush;
+ ++m_fail;
+ }
+ catch(...)
+ {
+ std::cout << "[FAIL]\nunknown exception" << std::flush;
+ ++m_fail;
+ }
+ }
+ }
+ }
+ void Report ()
+ {
+ const size_t size = m_Tests.size();
+ std::cout << std::endl;
+ std::cout << "[TOTAL](" << m_pass + m_fail << '/' << size << ")" << std::endl;
+ std::cout << "[OK](" << m_pass << '/' << size << ")" << std::endl;
+ if (m_fail)
+ std::cout << "[FAIL](" << m_fail << '/' << size << ")" << std::endl;
+ }
+ int Main (int argc, const char* argv[])
+ {
+ if(argc > 1
+ && (std::string(argv[1]) == "-h" || std::string(argv[1]) == "--help"))
+ {
+ std::cout << "Yaffut - Yet Another Framework For Unit Testing.\n\n"
+ "Usage: yaffut [OPTION] [Suite:|Suite::Test]...\n\n"
+ "Options:\n"
+ " -h, --help show this help\n"
+ " -l, --list list test cases" << std::endl;
+ return 0;
+ }
+ if(argc > 1
+ && (std::string(argv[1]) == "-l" || std::string(argv[1]) == "--list"))
+ {
+ Factory::Instance().List(argc > 2 ? argv[2] : "");
+ return 0;
+ }
+
+ const char* all[] = {"All"};
+ const char** test = all;
+ int num = 1;
+ if(1 < argc)
+ {
+ test = argv;
+ num = argc;
+ }
+
+ for(int i = 0; i < num; ++i)
+ {
+ try
+ {
+ Factory::Instance().Run(test[i]);
+ }
+ catch(const std::exception& e)
+ {
+ std::clog << e.what() << std::endl;
+ }
+ }
+
+ Factory::Instance().Report ();
+ return Factory::Instance().Fail ();
+ }
+};
+
+class failure: public std::exception
+{
+ std::string failure_;
+public:
+ template <typename Expected, typename Actual>
+ failure(const Expected& e, Actual& a, const char* at = "", const char* expr = "")
+ {
+ std::ostringstream os;
+ os << at << expr << "\nexpected: "
+ << "(" << demangle<Expected>() << ") " << e
+ << " != actual: " << "(" << demangle<Actual>() << ") " << a;
+ failure_ = os.str();
+ }
+ failure(const char* at = "", const char* expr = "")
+ {
+ std::ostringstream os;
+ os << at << expr;
+ failure_ = os.str();
+ }
+ virtual ~failure() throw() {}
+ virtual const char* what() const throw() { return failure_.c_str(); }
+};
+
+template <typename Suite, typename Case>
+struct Registrator
+{
+ Registrator()
+ {
+ Factory::Instance().Register(TestName(), Create);
+ }
+ const std::string& TestName()
+ {
+ static const std::string name(demangle<Suite>() + "::" + demangle<Case>());
+ return name;
+ }
+ static ITest* Create()
+ {
+ return new Case;
+ }
+};
+
+template <typename Suite, typename Case>
+struct Test: public ITest, public Suite
+{
+ static Registrator<Suite, Case> s_Registrator;
+ Test()
+ : Suite()
+ {
+ Registrator<Suite, Case>* r = &s_Registrator;
+ r = 0;
+ }
+ template <typename E, typename T>
+ void assert_throw(void(T::*mf)(), const char* at)
+ {
+ try
+ {
+ (dynamic_cast<T*> (this)->*mf)();
+ throw yaffut::failure (at, "statement failed to throw");
+ }
+ catch(const E&){}
+ }
+};
+
+template <typename Suite, typename Case>
+Registrator<Suite, Case> Test<Suite, Case>::s_Registrator;
+
+template <typename Expected, typename Actual>
+void equal(const Expected& e, const Actual& a, const char* at = "", const char* expr = "")
+{
+ if(e != a)
+ {
+ throw failure(e, a, at, expr);
+ }
+}
+inline void equal(double e, double a, const char* at = "", const char* expr = "")
+{
+ double max = std::abs(std::max(e, a));
+ max = max < 1.0 ? 1.0 : max;
+ if(std::abs(e - a) > std::numeric_limits<double>::epsilon() * max)
+ {
+ throw failure(e, a, at, expr);
+ }
+}
+inline void check(bool b, const char* at = "", const char* expr = "")
+{
+ if(!b)
+ {
+ throw failure(at, expr);
+ }
+}
+
+template <typename Expected, typename Actual>
+void unequal(const Expected& e, const Actual& a, const char* at = "", const char* expr = "")
+{
+ if(e == a)
+ {
+ throw failure(e, a, at, expr);
+ }
+}
+inline void unequal(double e, double a, const char* at = "", const char* expr = "")
+{
+ double max = std::abs(std::max(e, a));
+ max = max < 1.0 ? 1.0 : max;
+ if(std::abs(e - a) <= std::numeric_limits<double>::epsilon() * max)
+ {
+ throw failure(e, a, at, expr);
+ }
+}
+
+template <typename T>
+void fail(const T& expr, const char* at = "")
+{
+ std::ostringstream os;
+ os << expr;
+ throw failure(at, os.str().c_str());
+}
+
+template <typename E>
+void assert_throw(void(*pf)(), const char* at = "")
+{
+ try
+ {
+ (*pf)();
+ throw failure (at, " statement failed to throw");
+ }
+ catch(const E&){}
+}
+
+//define catch-all suite
+struct Suite {};
+
+}
+
+//and for those who prefer macro obscurity over more typing
+#define TEST(Suite, Case)\
+ namespace { struct Case: public yaffut::Test<Suite, Case>{ Case(); }; } \
+ template struct yaffut::Test<Suite, Case>; Case::Case()
+
+#define FUNC(Case)\
+ namespace { struct Case: public yaffut::Test<yaffut::Suite, Case>{ Case(); }; } \
+ template struct yaffut::Test<yaffut::Suite, Case>; Case::Case()
+
+#ifdef YAFFUT_MAIN
+
+#include <iostream>
+
+int main(int argc, const char* argv[])
+{
+ std::cout << "pid(" << getpid() << ")" << std::endl;
+ return yaffut::Factory::Instance().Main (argc, argv);
+};
+
+#endif /* YAFFUT_MAIN */
+
+#define yaffut_main(argc, argv) yaffut::Factory::Instance().Main (argc, argv)
+
+#endif
--- /dev/null
+#include "file-name.hh"
+
+#include "yaffut-parameters.hh"
+
+using namespace std;
+
+string slashify (string file_name);
+
+TEST_STRING (File_name, Mingw_slashify, "foe.ly")
+{
+ string s = slashify (to_string ());
+ EQUAL (parameter_one_, s);
+}
+
+TEST_STRING (File_name, Mingw_slashify_2, "/tmp/x.ly")
+{
+ string s = slashify (to_string ());
+ EQUAL (parameter_one_, s);
+}
+
+TEST_STRING (File_name, Mingw_slashify_3, "c:/tmp/x.ly")
+{
+ string s = slashify (to_string ());
+ EQUAL (parameter_one_, s);
+}
+
+TEST_STRING (File_name, Mingw_slashify_4, "\\tmp\\x.ly")
+{
+ string s = slashify (to_string ());
+ EQUAL ("/tmp/x.ly", s);
+}
--- /dev/null
+#include "file-path.hh"
+
+#include "yaffut.hh"
+#include "config.hh"
+
+TEST (File_path, Find)
+{
+ char const *extensions[] = {"ly", "", 0};
+ string file = "init";
+ char cwd[PATH_MAX];
+ getcwd (cwd, PATH_MAX);
+ string ly_dir = string (getenv ("top-src-dir")) + "/ly";
+ parse_path (string (1, PATHSEP) + ly_dir);
+ string file_name = find (file, extensions);
+ EQUAL (file_name.substr (file_name.rfind ('/')), "/init.ly");
+ file = "init.ly";
+ file_name = find (file, extensions);
+ EQUAL (file_name, ly_dir + "/init.ly");
+}
+++ /dev/null
-#define HAVE_BOOST_LAMBDA 1
-#include "std-vector.hh"
-
-#include <unistd.h>
-#include <iostream>
-
-#include <boost/test/auto_unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-
-using namespace std;
-using boost::unit_test::test_suite;
-
-#include "file-name.hh"
-string slashify (string file_name);
-
-// FIXME
-//BOOST_AUTO_UNIT_TEST (mingw_slashify)
-void mingw_slashify ()
-{
- File_name f = string ("foe.ly");
- string s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "foe.ly");
- f = string ("/tmp/x.ly");
- s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "/tmp/x.ly");
- f = string ("c:/tmp/x.ly");
- s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "c:/tmp/x.ly");
- f = string ("\\tmp\\x.ly");
- s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "/tmp/x.ly");
-}
-
-#include "config.hh"
-#include "file-path.hh"
-
-// FIXME
-//BOOST_AUTO_UNIT_TEST (mingw_slashify)
-void file_find ()
-{
- char const *extensions[] = {"ly", "", 0};
- string file = "init";
- File_path path;
- char cwd[PATH_MAX];
- getcwd (cwd, PATH_MAX);
- string ly_dir = string (getenv ("top-src-dir")) + "/ly";
- cout << ly_dir << endl;
- path.parse_path (string (1, PATHSEP) + ly_dir);
- string file_name = path.find (file, extensions);
- cout << file_name << endl;
- BOOST_CHECK_EQUAL (file_name.substr (file_name.rfind ('/')), "/init.ly");
- file = "init.ly";
- file_name = path.find (file, extensions);
- cout << file_name << endl;
- BOOST_CHECK_EQUAL (file_name, ly_dir + "/init.ly");
-
-}
#include <iostream>
-#include <boost/test/auto_unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
+#define YAFFUT_MAIN
+#include "yaffut.hh"
#if !STD_VECTOR
#define vector flower_vector
#endif
using namespace std;
-using boost::unit_test::test_suite;
-using namespace boost::unit_test;
template<typename T>
void
}
#endif
-BOOST_AUTO_UNIT_TEST (vector_erase)
+FUNC (vector_erase)
{
vector<int> v;
v.push_back (0);
v.push_back (1);
- BOOST_CHECK_EQUAL (v.size (), vsize (2));
+ EQUAL (v.size (), vsize (2));
v.erase (v.begin () + 1);
- BOOST_CHECK_EQUAL (v.size (), vsize (1));
- BOOST_CHECK_EQUAL (v.back (), 0);
+ EQUAL (v.size (), vsize (1));
+ EQUAL (v.back (), 0);
v.push_back (1);
- BOOST_CHECK_EQUAL (v.size (), vsize (2));
+ EQUAL (v.size (), vsize (2));
v.erase (v.begin () + 0);
- BOOST_CHECK_EQUAL (v.size (), vsize (1));
- BOOST_CHECK_EQUAL (v.back (), 1);
+ EQUAL (v.size (), vsize (1));
+ EQUAL (v.back (), 1);
}
-BOOST_AUTO_UNIT_TEST (vector_slice)
+FUNC (vector_slice)
{
vector<int> v;
v.push_back (0);
v.push_back (2);
v.push_back (3);
#if VECTOR_SLICE
- BOOST_CHECK_EQUAL (v.slice (0, 0).size (), vsize (0));
- BOOST_CHECK_EQUAL (v.slice (0, v.size ()).size (), v.size ());
- BOOST_CHECK_EQUAL (v.slice (1, 2).size (), vsize (1));
+ EQUAL (v.slice (0, 0).size (), vsize (0));
+ EQUAL (v.slice (0, v.size ()).size (), v.size ());
+ EQUAL (v.slice (1, 2).size (), vsize (1));
#else
- BOOST_CHECK_EQUAL (vector<int> (v.begin (), v.begin ()).size (), vsize (0));
- BOOST_CHECK_EQUAL (vector<int> (v.begin (), v.end ()).size (), v.size ());
- BOOST_CHECK_EQUAL (vector<int> (v.begin () + 1, v.begin () + 2).size (),
+ EQUAL (vector<int> (v.begin (), v.begin ()).size (), vsize (0));
+ EQUAL (vector<int> (v.begin (), v.end ()).size (), v.size ());
+ EQUAL (vector<int> (v.begin () + 1, v.begin () + 2).size (),
vsize (1));
#endif
}
-BOOST_AUTO_UNIT_TEST (vector_sorting)
+FUNC (vector_sorting)
{
vector<int> v;
v.push_back (2);
//sort (v.begin (), v.end ());
vector_sort (v, less<int> ());
#endif
- BOOST_CHECK_EQUAL (v[0], 0);
- BOOST_CHECK_EQUAL (v[1], 1);
- BOOST_CHECK_EQUAL (v[2], 2);
+ EQUAL (v[0], 0);
+ EQUAL (v[1], 1);
+ EQUAL (v[2], 2);
}
-BOOST_AUTO_UNIT_TEST (vector_insert)
+FUNC (vector_insert)
{
vector<int> v;
v.push_back (0);
#else
v.insert (v.begin (), 1);
#endif
- BOOST_CHECK_EQUAL (v[0], 1);
+ EQUAL (v[0], 1);
#if VECTOR_INSERT
v.insert (2, v.size ());
#else
v.insert (v.end (), 2);
#endif
- BOOST_CHECK_EQUAL (v.back (), 2);
+ EQUAL (v.back (), 2);
vector<int> u;
u.insert (u.begin (), v.begin (), v.end ());
- BOOST_CHECK_EQUAL (u.size (), v.size ());
+ EQUAL (u.size (), v.size ());
u.clear ();
u.insert (u.end (), v.begin (), v.end ());
- BOOST_CHECK_EQUAL (u.size (), v.size ());
+ EQUAL (u.size (), v.size ());
u.clear ();
}
-BOOST_AUTO_UNIT_TEST (parray_concat)
+FUNC (parray_concat)
{
#if !STD_VECTOR
Link_array<int> u, v;
v.push_back (&a[3]);
v.push_back (&a[4]);
concat (u, v);
- BOOST_CHECK_EQUAL (u[0], &a[0]);
- BOOST_CHECK_EQUAL (u[1], &a[1]);
- BOOST_CHECK_EQUAL (u[2], &a[2]);
- BOOST_CHECK_EQUAL (u[3], &a[3]);
- BOOST_CHECK_EQUAL (u[4], &a[4]);
- BOOST_CHECK_EQUAL (u.size (), vsize (5));
+ EQUAL (u[0], &a[0]);
+ EQUAL (u[1], &a[1]);
+ EQUAL (u[2], &a[2]);
+ EQUAL (u[3], &a[3]);
+ EQUAL (u[4], &a[4]);
+ EQUAL (u.size (), vsize (5));
concat (u, v);
- BOOST_CHECK_EQUAL (u.size (), vsize (7));
+ EQUAL (u.size (), vsize (7));
u.clear ();
v.clear ();
v.push_back (&a[3]);
v.push_back (&a[4]);
concat (u, v);
- BOOST_CHECK_EQUAL (u[0], &a[0]);
- BOOST_CHECK_EQUAL (u[1], &a[1]);
- BOOST_CHECK_EQUAL (u[2], &a[2]);
- BOOST_CHECK_EQUAL (u[3], &a[3]);
- BOOST_CHECK_EQUAL (u[4], &a[4]);
- BOOST_CHECK_EQUAL (u.size (), vsize (5));
+ EQUAL (u[0], &a[0]);
+ EQUAL (u[1], &a[1]);
+ EQUAL (u[2], &a[2]);
+ EQUAL (u[3], &a[3]);
+ EQUAL (u[4], &a[4]);
+ EQUAL (u.size (), vsize (5));
}
-BOOST_AUTO_UNIT_TEST (parray_uniq)
+FUNC (parray_uniq)
{
vector<int> v;
v.push_back (0);
v.push_back (0);
vector_sort (v, less<int> ());
uniq (v);
- BOOST_CHECK_EQUAL (v.size (), vsize (2));
+ EQUAL (v.size (), vsize (2));
}
-BOOST_AUTO_UNIT_TEST (vector_search)
+FUNC (vector_search)
{
vector<int> v;
v.push_back (0);
v.push_back (1);
v.push_back (2);
vsize i = binary_search (v, 1, less<int> ());
- BOOST_CHECK_EQUAL (i, vsize (1));
-}
-
-#if 0
-#include "file-name.hh"
-string slashify (string file_name);
-
-BOOST_AUTO_UNIT_TEST (mingw_slashify)
-{
- File_name f = string ("foe.ly");
- string s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "foe.ly");
- f = string ("/tmp/x.ly");
- s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "/tmp/x.ly");
- f = string ("c:/tmp/x.ly");
- s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "c:/tmp/x.ly");
- f = string ("\\tmp\\x.ly");
- s = slashify (f.to_string ());
- cout << s << endl;
- BOOST_CHECK_EQUAL (s, "/tmp/x.ly");
-}
-#endif
-
-void mingw_slashify ();
-void file_find ();
-
-#include <boost/test/results_reporter.hpp>
-#include <boost/test/framework.hpp>
-#include <boost/test/detail/unit_test_parameters.hpp>
-
-test_suite*
-init_unit_test_suite (int, char**)
-{
- vsize i = 0;
- vsize j = 0;
- vector<int> v;
- binary_search (v, 1, less<int> (), i, j);
- //binary_search_bounds (v, 1, &default_compare, 0, 0);
-
- //Link_array<char> w;
- vector<char*> w;
- binary_search (w, (char*)1, less<char*> (), i, j);
-
- test_suite *test = BOOST_TEST_SUITE("Flower");
-
-
- test->add (BOOST_TEST_CASE (vector_erase));
- test->add (BOOST_TEST_CASE (vector_slice));
- test->add (BOOST_TEST_CASE (vector_sorting));
- test->add (BOOST_TEST_CASE (vector_insert));
- test->add (BOOST_TEST_CASE (parray_concat));
- test->add (BOOST_TEST_CASE (parray_uniq));
- test->add (BOOST_TEST_CASE (vector_search));
- test->add (BOOST_TEST_CASE (mingw_slashify));
- test->add (BOOST_TEST_CASE (file_find));
-
- return test;
+ EQUAL (i, vsize (1));
}
--- /dev/null
+
+\header {
+texidoc = "@cindex Ancient Accidentals
+Accidentals are available in different ancient styles, which all
+are collected here.
+"
+}
+
+\version "2.11.6"
+
+\relative c'' {
+ \time 3/4
+ cis^\markup { \typewriter default } c ces
+
+ \override Staff.Accidental #'glyph-name-alist = #alteration-hufnagel-glyph-name-alist
+ cis^\markup { \typewriter hufnagel } c ces
+
+ \override Staff.Accidental #'glyph-name-alist = #alteration-medicaea-glyph-name-alist
+ cis^\markup { \typewriter medicaea } c ces
+
+ \override Staff.Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
+ cis^\markup { \typewriter vaticana } c ces
+
+ \override Staff.Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
+ cis^\markup { \typewriter mensural } c ces
+}
\clef violin
\key cis \major cis1 \key ces \major ces
\clef soprano
- \key cis \major cis \key ces \major ces
+ \key cis \major cis \key ces \major ces \break
\clef mezzosoprano
\key cis \major cis \key ces \major ces
\clef alto
- \key cis \major cis \key ces \major ces
+ \key cis \major cis \break \key ces \major ces
\clef tenor
- \key cis \major cis \key ces \major ces
+ \key cis \major cis \key ces \major ces \break
\clef baritone
\key cis \major cis \key ces \major ces
\clef bass
-\version "2.10.0"
+\version "2.11.5"
{
\fatText
\override #'(font-encoding . fetaMusic) {
\lookup #"noteheads-0"
}
- \musicglyph #"accidentals.-1"
+ \musicglyph #"accidentals.mirroredflat"
\combine "X" "+"
\combine "o" "/"
\box \column { \line { "string 1" } \line { "string 2" } }
#:hspace 2.0
#:override '(font-encoding . fetaMusic) #:line (#:lookup "noteheads-0"
)
- #:musicglyph "accidentals.-1"
+ #:musicglyph "accidentals.mirroredflat"
#:combine "X" "+"
#:combine "o" "/"
#:box #:column ("string 1" "string 2")
--- /dev/null
+\version "2.10.7"
+\header {
+ texidoc = "Clefs are also folded under cross staff constructs."
+}
+
+\layout { ragged-right = ##t}
+
+\context PianoStaff <<
+ \new Staff = "up"
+ \relative c'' <<
+ {
+ \stemDown
+ f16[ \change Staff = down \stemUp
+ \clef treble g,]
+
+ } \\
+ >>
+ \new Staff = "down" {
+ \time 3/8 \clef bass s8
+ }
+>>
+
--- /dev/null
+\header{
+ texidoc = "If a floating grace spacing section attaches to a note
+across a line break, it gets attached to the end of line."
+}
+
+
+\version "2.10.7"
+
+\new Score \with {
+ \override SpacingSpanner #'strict-grace-spacing = ##t
+ \override PaperColumn #'used = ##t
+} <<
+
+ \new Staff <<
+
+ \new Voice {
+ \time 6/4 s2
+ s2 \bar "" \break
+ s2
+ }
+
+ \new Voice {
+ b'4
+ \afterGrace c''4 {b'16}
+ s4
+ s4
+ c''4
+ }
+ \new Voice {
+ c'4
+ c'8.
+ r16
+ c'4
+ c'4
+ c'4
+ }
+ >>
+>>
+
+++ /dev/null
-
-\header {
-texidoc = "@cindex Ancient Accidentals
-Accidentals are available in different ancient styles, which all
-are collected here.
-"
-}
-
-\version "2.10.0"
-
-\relative c'' {
- \time 5/4
- \override Staff.Accidental #'style = #'default
- cisis^\markup { \typewriter default } cis c ces ceses
- \override Staff.Accidental #'style = #'hufnagel
- cisis^\markup { \typewriter hufnagel } cis c ces ceses
- \override Staff.Accidental #'style = #'medicaea
- cisis^\markup { \typewriter medicaea } cis c ces ceses
- \override Staff.Accidental #'style = #'vaticana
- cisis^\markup { \typewriter vaticana } cis c ces ceses
- \override Staff.Accidental #'style = #'mensural
- cisis^\markup { \typewriter mensural } cis c ces ceses
-}
-\version "2.10.0"
+\version "2.11.6"
% TODO: split ancient-font into seperate files; possibly in
% different locations.
\header {
\override Staff.StaffSymbol #'line-count = #4
\transpose c c {
- \override Staff.KeySignature #'style = #'vaticana
- \override Staff.Accidental #'style = #'vaticana
+ \override Staff.KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
+ \override Staff.Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
\override NoteHead #'style = #'vaticana.punctum
\key es \major
\clef "vaticana-fa2"
\override NoteHead #'style = #'vaticana.cephalicus
es f
- \override Staff.KeySignature #'style = #'medicaea
- \override Staff.Accidental #'style = #'medicaea
+ \override Staff.KeySignature #'glyph-name-alist = #alteration-medicaea-glyph-name-alist
+ \override Staff.Accidental #'glyph-name-alist = #alteration-medicaea-glyph-name-alist
\override Staff.Custos #'style = #'medicaea
\override NoteHead #'style = #'medicaea.punctum
\clef "medicaea-fa2"
\override NoteHead #'style = #'medicaea.rvirga
e! des! ces!
- \override Staff.KeySignature #'style = #'hufnagel
- \override Staff.Accidental #'style = #'hufnagel
+ \override Staff.KeySignature #'glyph-name-alist = #alteration-hufnagel-glyph-name-alist
+ \override Staff.Accidental #'glyph-name-alist = #alteration-hufnagel-glyph-name-alist
\override Staff.Custos #'style = #'hufnagel
\override NoteHead #'style = #'hufnagel.punctum
\clef "hufnagel-fa2"
\accepts MensuralVoice
\consists Custos_engraver
\override TimeSignature #'style = #'mensural
- \override KeySignature #'style = #'mensural
- \override Accidental #'style = #'mensural
+ \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
+ \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
\override Custos #'style = #'mensural
\override Custos #'neutral-position = #3
\override Custos #'neutral-direction = #down
\remove Time_signature_engraver
\override StaffSymbol #'thickness = #2.0
\override StaffSymbol #'line-count = #4
- \override KeySignature #'style = #'vaticana
- \override Accidental #'style = #'vaticana
+ \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
+ \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
\override Custos #'style = #'vaticana
\override Custos #'neutral-position = #4
\override Custos #'neutral-direction = #down
--- /dev/null
+\header {
+
+ texidoc = "Makam is Turkish type of melody that uses 1/9 tone
+ microtonal alterations."
+
+}
+
+
+\version "2.11.6"
+
+%{
+
+Define 1/9 alterations.
+
+%}
+
+
+#(define-public KOMA 1/9)
+#(define-public BAKIYE 4/9)
+#(define-public KUCUK 5/9)
+#(define-public BUYUKMUCENNEB 8/9)
+
+%{
+
+Define pitch names
+
+%}
+
+makamPitchNames = #`(
+ (c . ,(ly:make-pitch -1 0 NATURAL))
+ (d . ,(ly:make-pitch -1 1 NATURAL))
+ (e . ,(ly:make-pitch -1 2 NATURAL))
+ (f . ,(ly:make-pitch -1 3 NATURAL))
+ (g . ,(ly:make-pitch -1 4 NATURAL))
+ (a . ,(ly:make-pitch -1 5 NATURAL))
+ (b . ,(ly:make-pitch -1 6 NATURAL))
+
+ (cc . ,(ly:make-pitch -1 0 KOMA))
+ (dc . ,(ly:make-pitch -1 1 KOMA))
+ (ec . ,(ly:make-pitch -1 2 KOMA))
+ (fc . ,(ly:make-pitch -1 3 KOMA))
+ (gc . ,(ly:make-pitch -1 4 KOMA))
+ (ac . ,(ly:make-pitch -1 5 KOMA))
+ (bc . ,(ly:make-pitch -1 6 KOMA))
+
+ (cb . ,(ly:make-pitch -1 0 BAKIYE))
+ (db . ,(ly:make-pitch -1 1 BAKIYE))
+ (eb . ,(ly:make-pitch -1 2 BAKIYE))
+ (fb . ,(ly:make-pitch -1 3 BAKIYE))
+ (gb . ,(ly:make-pitch -1 4 BAKIYE))
+ (ab . ,(ly:make-pitch -1 5 BAKIYE))
+ (bb . ,(ly:make-pitch -1 6 BAKIYE))
+
+ (ck . ,(ly:make-pitch -1 0 KUCUK))
+ (dk . ,(ly:make-pitch -1 1 KUCUK))
+ (ek . ,(ly:make-pitch -1 2 KUCUK))
+ (fk . ,(ly:make-pitch -1 3 KUCUK))
+ (gk . ,(ly:make-pitch -1 4 KUCUK))
+ (ak . ,(ly:make-pitch -1 5 KUCUK))
+ (bk . ,(ly:make-pitch -1 6 KUCUK))
+
+ (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
+ (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
+ (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
+ (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))
+ (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
+ (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
+ (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
+
+ ;; f for flat.
+ (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
+ (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
+ (efc . ,(ly:make-pitch -1 2 (- KOMA)))
+ (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
+ (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
+ (afc . ,(ly:make-pitch -1 5 (- KOMA)))
+ (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
+
+ (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
+ (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
+ (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
+ (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
+ (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
+ (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
+ (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
+
+ (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
+ (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
+ (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
+ (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
+ (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
+ (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
+ (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
+
+ (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
+ (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
+ (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
+ (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
+ (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
+ (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
+ (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
+
+)
+
+
+%% set pitch names.
+pitchnames = \makamPitchNames
+#(ly:parser-set-note-names parser makamPitchNames)
+
+\paper
+{
+ ragged-right = ##t
+}
+
+\relative {
+
+ %{ define alteration <-> symbol mapping. The following glyphs are available.
+
+ accidentals.sharp
+ accidentals.sharp.slashslash.stem
+ accidentals.sharp.slashslashslash.stemstem
+ accidentals.sharp.slashslashslash.stem
+ accidentals.sharp.slashslash.stemstemstem
+ accidentals.natural
+ accidentals.flat
+ accidentals.flat.slash
+ accidentals.flat.slashslash
+ accidentals.mirroredflat.flat
+ accidentals.mirroredflat
+ accidentals.flatflat
+ accidentals.flatflat.slash
+ accidentals.doublesharp
+
+ %}
+
+
+ \override Accidental #'glyph-name-alist = #'((1 . "accidentals.doublesharp")
+ (8/9 . "accidentals.sharp.slashslashslash.stemstem")
+ (5/9 . "accidentals.sharp.slashslashslash.stem")
+ (4/9 . "accidentals.sharp")
+ (1/9 . "accidentals.sharp.slashslash.stem")
+ (0 . "accidentals.natural")
+ (-1/9 . "accidentals.mirroredflat")
+ (-4/9 . "accidentals.flat.slash")
+ (-5/9 . "accidentals.flat")
+ (-8/9 . "accidentals.flat.slashslash")
+ (-1 . "accidentals.flatflat")
+ )
+
+
+
+ c cc db fk gbm gfc gfb efk dfbm
+}
{
Stream_event *note = entry->melodic_;
Grob *support = entry->head_;
- Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
-
bool as_suggestion = to_boolean (entry->origin_->get_property ("suggestAccidentals"));
Grob *a = 0;
if (as_suggestion)
a->set_property ("restore-first", SCM_BOOL_T);
}
- a->set_property ("alteration", scm_from_int (pitch->get_alteration () * Rational (4)));
entry->accidental_ = a;
}
/* grobs */
"Accidental "
- "AccidentalCautionary"
- "AccidentalSuggestion",
+ "AccidentalCautionary "
+ "AccidentalSuggestion ",
/* props */
"autoAccidentals "
&& !to_boolean (me->get_property ("restore-first"))
&& !parens)
{
- int acc = scm_to_int (me->get_property ("alteration"));
- switch (acc)
+ Rational alteration = ly_scm2rational (me->get_property ("alteration"));
+ if (alteration == FLAT_ALTERATION)
{
- case FLAT:
- {
- Box stem = b;
- Box bulb = b;
+ Box stem = b;
+ Box bulb = b;
- /*
- we could make the stem thinner, but that places the flats
- really close.
- */
- stem[X_AXIS][RIGHT] *= .5;
-
- /*
- To prevent vertical alignment for 6ths
- */
- stem[Y_AXIS] *= 1.1;
- bulb[Y_AXIS][UP] *= .35;
-
- boxes.push_back (bulb);
- boxes.push_back (stem);
- }
- break;
- case NATURAL:
- {
- Box lstem = b;
- Box rstem = b;
- Box belly = b;
-
- lstem[Y_AXIS] *= 1.1;
- rstem[Y_AXIS] *= 1.1;
+ /*
+ we could make the stem thinner, but that places the flats
+ really close.
+ */
+ stem[X_AXIS][RIGHT] *= .5;
- belly[Y_AXIS] *= 0.75;
- lstem[X_AXIS][RIGHT] *= .33;
- rstem[X_AXIS][LEFT] = rstem[X_AXIS].linear_combination (1.0 / 3.0);
- lstem[Y_AXIS][DOWN] = belly[Y_AXIS][DOWN];
- rstem[Y_AXIS][UP] = belly[Y_AXIS][UP];
- boxes.push_back (belly);
- boxes.push_back (lstem);
- boxes.push_back (rstem);
- }
- break;
/*
- TODO: add support for, double flat.
+ To prevent vertical alignment for 6ths
*/
+ stem[Y_AXIS] *= 1.1;
+ bulb[Y_AXIS][UP] *= .35;
+
+ boxes.push_back (bulb);
+ boxes.push_back (stem);
+ }
+ else if (alteration == NATURAL_ALTERATION)
+ {
+ Box lstem = b;
+ Box rstem = b;
+ Box belly = b;
+
+ lstem[Y_AXIS] *= 1.1;
+ rstem[Y_AXIS] *= 1.1;
+
+ belly[Y_AXIS] *= 0.75;
+ lstem[X_AXIS][RIGHT] *= .33;
+ rstem[X_AXIS][LEFT] = rstem[X_AXIS].linear_combination (1.0 / 3.0);
+ lstem[Y_AXIS][DOWN] = belly[Y_AXIS][DOWN];
+ rstem[Y_AXIS][UP] = belly[Y_AXIS][UP];
+ boxes.push_back (belly);
+ boxes.push_back (lstem);
+ boxes.push_back (rstem);
}
+ /*
+ TODO: add support for, double flat.
+ */
}
if (!boxes.size ())
return boxes;
}
-/*
- * Some styles do not provide all flavours of accidentals, e.g. there
- * is currently no sharp accidental in vaticana style. In these cases
- * this function falls back to one of the other styles.
- */
-
-/*
- todo: this sort of stuff in Scheme. --hwn.
-*/
-string
-Accidental_interface::get_fontcharname (string style, int alteration)
-{
- if (alteration == DOUBLE_FLAT
- || alteration == DOUBLE_SHARP)
- return to_string (alteration);
-
- if (style == "hufnagel")
- switch (alteration)
- {
- case FLAT: return "hufnagel-1";
- case 0: return "vaticana0";
- case SHARP: return "mensural1";
- }
- if (style == "medicaea")
- switch (alteration)
- {
- case FLAT: return "medicaea-1";
- case 0: return "vaticana0";
- case SHARP: return "mensural1";
- }
- if (style == "vaticana")
- switch (alteration)
- {
- case FLAT: return "vaticana-1";
- case 0: return "vaticana0";
- case SHARP: return "mensural1";
- }
- if (style == "mensural")
- switch (alteration)
- {
- case FLAT: return "mensural-1";
- case 0: return "vaticana0";
- case SHARP: return "mensural1";
- }
-
- if (style == "neomensural")
- style = ""; // currently same as default
- if (style == "default")
- style = "";
-
- return style + to_string (alteration);
-}
-
MAKE_SCHEME_CALLBACK (Accidental_interface, print, 1);
SCM
Accidental_interface::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
- bool parens = to_boolean (me->get_property ("parenthesized"));
-
- SCM scm_style = me->get_property ("style");
- string style;
- if (scm_is_symbol (scm_style))
- style = ly_symbol2string (scm_style);
- else
- /*
- preferably no name for the default style.
- */
- style = "";
Font_metric *fm = Font_interface::get_default_font (me);
- SCM stencils = me->get_property ("stencils");
- if (!scm_is_pair (stencils)
- || !unsmob_stencil (scm_car (stencils)))
- return SCM_EOL;
+ SCM alist = me->get_property ("glyph-name-alist");
+ SCM alt = me->get_property ("alteration");
+ SCM glyph_name = ly_assoc_get (alt, alist, SCM_BOOL_F);
+
+ if (!scm_is_string (glyph_name))
+ {
+ me->warning (_f ("Could not find glyph-name for alteration %s",
+ ly_scm2rational (alt).to_string ().c_str ()));
+ return SCM_EOL;
+ }
- Stencil mol (*unsmob_stencil (scm_car (stencils)));
+ Stencil mol (fm->find_by_name (scm_i_string_chars (glyph_name)));
if (to_boolean (me->get_property ("restore-first")))
{
- string font_char = get_fontcharname (style, 0);
- Stencil acc (fm->find_by_name ("accidentals." + font_char));
+ /*
+ this isn't correct for ancient accidentals, but they don't
+ use double flats/sharps anyway.
+ */
+ Stencil acc (fm->find_by_name ("accidentals.natural"));
if (acc.is_empty ())
- me->warning (_f ("accidental `%s' not found", font_char));
+ me->warning (_ ("natural alteration glyph not found"));
else
mol.add_at_edge (X_AXIS, LEFT, acc, 0.1, 0);
}
- if (parens)
+ if (to_boolean (me->get_property ("parenthesized")))
mol = parenthesize (me, mol);
return mol.smobbed_copy ();
}
-
-MAKE_SCHEME_CALLBACK (Accidental_interface, calc_stencils, 1);
-SCM
-Accidental_interface::calc_stencils (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
-
- SCM scm_style = me->get_property ("style");
- string style;
- if (scm_is_symbol (scm_style))
- style = ly_symbol2string (scm_style);
- else
- /*
- preferably no name for the default style.
- */
- style = "";
-
-
- Font_metric *fm = Font_interface::get_default_font (me);
- SCM acc = me->get_property ("alteration");
- if (scm_is_number (acc))
- {
- string font_char = get_fontcharname (style, scm_to_int (acc));
-
- Stencil acc_stencil (fm->find_by_name ("accidentals." + font_char));
-
- return scm_list_1 (acc_stencil.smobbed_copy ());
- }
- else
- return SCM_EOL;
-}
ADD_INTERFACE (Accidental_interface,
"alteration "
"avoid-slur "
"forced "
- "style "
"parenthesized "
"restore-first "
+ "glyph-name-alist "
"tie "
);
}
else
{
- accidentals_[d]->set_property ("alteration", scm_from_int (int (Real (Rational (4) * p.get_alteration ()))));
+ accidentals_[d]->set_property ("alteration", ly_rational2scm (p.get_alteration ()));
}
}
while (flip (&d) != DOWN);
Grob *common_x = common_refpoint_of_array (elements, me, X_AXIS);
Interval xext = Axis_group_interface::relative_group_extent (elements, common_x, X_AXIS);
-
+ if (xext.is_empty ())
+ {
+ me->programming_error ("elements have no X extent.");
+ xext = Interval (0, 0);
+ }
Stencil left_br = Horizontal_bracket::make_enclosing_bracket (me, me, elements,
Y_AXIS, LEFT);
"(or #f if not specified).")
{
SCM handle = scm_assoc (key, alist);
-
+ if (scm_is_pair (handle))
+ return scm_cdr (handle);
+
if (default_value == SCM_UNDEFINED)
default_value = SCM_BOOL_F;
- if (scm_is_pair (handle))
- return scm_cdr (handle);
return default_value;
}
Grob *common = common_refpoint_of_array (grobs, refpoint, a);
Interval ext = Axis_group_interface::relative_group_extent (grobs, common, a);
- Stencil b = make_bracket (me, ext.length(), a, dir);
- b.translate_axis (ext[LEFT] - refpoint->relative_coordinate (common, a), a);
+ if (ext.is_empty ())
+ {
+ me->programming_error ("Can't enclose empty extents with bracket");
+ return Stencil ();
+ }
+ else
+ {
+ Stencil b = make_bracket (me, ext.length(), a, dir);
+ b.translate_axis (ext[LEFT] - refpoint->relative_coordinate (common, a), a);
- return b;
+ return b;
+ }
}
-
/*
TODO:
Support texts on the brackets?
*/
-
MAKE_SCHEME_CALLBACK (Horizontal_bracket, print, 1);
SCM
Horizontal_bracket::print (SCM smob)
}
-SCM
-make_qt_key (SCM rat_key)
-{
- SCM qt_key = SCM_EOL;
- SCM *tail = &qt_key;
-
- for (SCM s = rat_key; scm_is_pair (s); s = scm_cdr (s))
- {
- *tail = scm_cons (scm_cons (scm_caar (s),
- scm_from_int (Rational (4)* ly_scm2rational (scm_cdar (s)))),
- SCM_EOL);
- tail = SCM_CDRLOC (*tail);
- }
-
- return qt_key;
-}
-
void
Key_engraver::create_key (bool is_default)
{
key_event_
? key_event_->self_scm () : SCM_EOL);
- cancellation_->set_property ("alteration-alist", make_qt_key (restore));
+ cancellation_->set_property ("alteration-alist", restore);
cancellation_->set_property ("c0-position",
get_property ("middleCPosition"));
}
}
-
- item_->set_property ("alteration-alist", make_qt_key (key));
+ item_->set_property ("alteration-alist", key);
}
if (!is_default)
#include "lookup.hh"
#include "output-def.hh"
#include "staff-symbol-referencer.hh"
+#include "rational.hh"
struct Key_signature_interface
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
-
DECLARE_GROB_INTERFACE();
};
-/*
- FIXME: too much hardcoding here.
-*/
-const int FLAT_TOP_PITCH = 2; /* fes, ges, as and bes typeset in lower octave */
-const int SHARP_TOP_PITCH = 4; /* ais and bis typeset in lower octave */
-
-/*
- TODO: look this up. I'm not sure where the naturals ought to go.
-
- COMMENT: Current implementation does not use the NATURAL_TOP_PITCH for anything,
- always typesets naturals in the same place as the thing they cancel. -rz
-*/
-const int NATURAL_TOP_PITCH = 4;
-
-/*
- FIXME: key-item should just get a list of (position, acc), and leave
- the thinking to other parties.
-
- - TODO: put this in Scheme
-
- TODO: can we do without c0pos? it's partly musical.
-*/
-int
-alteration_pos (SCM what, int alter, int c0p)
-{
- if (scm_is_pair (what))
- return scm_to_int (scm_car (what)) * 7 + scm_to_int (scm_cdr (what)) + c0p;
-
- int p = scm_to_int (what);
-
- // Find the c in the range -4 through 2
- int from_bottom_pos = c0p + 4;
- from_bottom_pos = from_bottom_pos % 7;
- from_bottom_pos = (from_bottom_pos + 7) % 7; // Precaution to get positive.
- int c0 = from_bottom_pos - 4;
-
- if ((alter < 0 && ((p > FLAT_TOP_PITCH) || (p + c0 > 4)) && (p + c0 > 1))
- || (alter > 0 && ((p > SHARP_TOP_PITCH) || (p + c0 > 5)) && (p + c0 > 2))
- || (alter == 0 && ((p > NATURAL_TOP_PITCH) || (p + c0 > 5)) && (p + c0 > 2)))
- {
- p -= 7; /* Typeset below c_position */
- }
-
- /* Provide for the four cases in which there's a glitch
- it's a hack, but probably not worth
- the effort of finding a nicer solution.
- --dl. */
- if (c0 == 2 && alter > 0 && p == 3)
- p -= 7;
- if (c0==-3 && alter > 0 && p ==-1)
- p += 7;
- if (c0==-4 && alter < 0 && p ==-1)
- p += 7;
- if (c0==-2 && alter < 0 && p ==-3)
- p += 7;
-
- return p + c0;
-}
/*
TODO
else
style = "";
- SCM newas = me->get_property ("alteration-alist");
Stencil mol;
SCM c0s = me->get_property ("c0-position");
- int c0p = 0;
- if (scm_is_number (c0s))
- c0p = scm_to_int (c0s);
bool is_cancellation = me->internal_has_interface
(ly_symbol2scm ("key-cancellation-interface"));
int last_pos = -1000;
Font_metric *fm = Font_interface::get_default_font (me);
- for (SCM s = newas; scm_is_pair (s); s = scm_cdr (s))
+ SCM alist = me->get_property ("glyph-name-alist");
+
+ for (SCM s = me->get_property ("alteration-alist"); scm_is_pair (s); s = scm_cdr (s))
{
- int alteration = scm_to_int (scm_cdar (s));
- string font_char
- = Accidental_interface::get_fontcharname (style,
- is_cancellation
- ? 0
- : alteration);
- Stencil acc (fm->find_by_name ("accidentals." + font_char));
+ SCM alt = is_cancellation
+ ? scm_from_int (0)
+ : scm_cdar (s);
+
+ SCM glyph_name = ly_assoc_get (alt, alist, SCM_BOOL_F);
+ if (!scm_is_string (glyph_name))
+ {
+ me->warning (_f ("No glyph found for alteration: %s",
+ ly_scm2rational (alt).to_string ().c_str ()));
+ continue;
+ }
+
+ Stencil acc (fm->find_by_name (ly_scm2string (glyph_name)));
if (acc.is_empty ())
- me->warning (_f ("accidental `%s' not found", font_char));
+ me->warning (_ ("alteration not found"));
else
{
SCM what = scm_caar (s);
- int pos = alteration_pos (what, alteration, c0p);
+
+ SCM proc = ly_lily_module_constant ("key-signature-interface::alteration-position");
+
+ int pos = scm_to_int (scm_call_3 (proc, what, scm_cdar (s), c0s));
acc.translate_axis (pos * inter, Y_AXIS);
/*
ADD_INTERFACE (Key_signature_interface,
"A group of accidentals, to be printed as signature sign.",
+ "alteration-alist "
"c0-position "
+ "glyph-name-alist "
"style "
- "alteration-alist "
);
#include <unistd.h>
+#include "lily-parser.hh"
+
#include "file-name-map.hh"
#include "file-name.hh"
#include "file-path.hh"
#include "international.hh"
#include "lily-lexer.hh"
-#include "lily-parser.hh"
#include "ly-module.hh"
#include "main.hh"
#include "program-option.hh"
LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
1, 0, 0, (SCM parser_smob),
- "Return the lexer for PARSER_SMOB.")
+ "Return the lexer for @var{parser-smob}.")
{
Lily_parser *parser = unsmob_lily_parser (parser_smob);
return parser->lexer_->self_scm ();
LY_DEFINE (ly_parser_clone, "ly:parser-clone",
1, 0, 0, (SCM parser_smob),
- "Return a clone of PARSER_SMOB.")
+ "Return a clone of @var{parser-smob}.")
{
Lily_parser *parser = unsmob_lily_parser (parser_smob);
Lily_parser *clone = new Lily_parser (*parser);
LY_DEFINE (ly_parser_define, "ly:parser-define!",
3, 0, 0, (SCM parser_smob, SCM symbol, SCM val),
- "Bind SYMBOL to VAL in PARSER_SMOB's module.")
+ "Bind @var{symbol} to @var{val} in @var{parser-smob}'s module.")
{
Lily_parser *parser = unsmob_lily_parser (parser_smob);
SCM_ASSERT_TYPE (scm_is_symbol (symbol), symbol, SCM_ARG2, __FUNCTION__, "symbol");
LY_DEFINE (ly_parser_lookup, "ly:parser-lookup",
2, 0, 0, (SCM parser_smob, SCM symbol),
- "Lookup @var{symbol} in @var{parser_smob}'s module. "
+ "Lookup @var{symbol} in @var{parser-smob}'s module. "
"Undefined is '().")
{
Lily_parser *parser = unsmob_lily_parser (parser_smob);
LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
2, 0, 0, (SCM parser_smob, SCM ly_code),
- "Parse the string LY_CODE with PARSER_SMOB."
+ "Parse the string @code{ly-code} with @code{parser-smob}."
"Upon failure, throw @code{ly-file-failed} key.")
{
Lily_parser *parser = unsmob_lily_parser (parser_smob);
"Stem and noteheads combined",
/* properties */
- "accidentals "
"arpeggio "
"force-hshift "
"horizontal-shift "
#include "engraver.hh"
+#include "context.hh"
#include "item.hh"
#include "pointer-group-interface.hh"
class Note_spacing_engraver : public Engraver
{
Grob *last_spacing_;
+ Context *last_spacing_parent_context_;
+
Grob *spacing_;
void add_spacing_item (Grob *);
-
TRANSLATOR_DECLARATIONS (Note_spacing_engraver);
protected:
DECLARE_ACKNOWLEDGER (rhythmic_grob);
DECLARE_ACKNOWLEDGER (note_column);
void stop_translation_timestep ();
+ virtual void finalize ();
+ virtual void derived_mark () const;
};
+void
+Note_spacing_engraver::derived_mark () const
+{
+ if (last_spacing_parent_context_)
+ scm_gc_mark (last_spacing_parent_context_->self_scm ());
+}
+
Note_spacing_engraver::Note_spacing_engraver ()
{
+ last_spacing_parent_context_ = 0;
last_spacing_ = 0;
spacing_ = 0;
}
spacing_ = make_item ("NoteSpacing", g->self_scm ());
}
-
if (spacing_)
{
Pointer_group_interface::add_grob (spacing_,
g);
if (last_spacing_)
- {
- Pointer_group_interface::add_grob (last_spacing_,
- ly_symbol2scm ("right-items"),
- g);
- }
+ Pointer_group_interface::add_grob (last_spacing_,
+ ly_symbol2scm ("right-items"),
+ g);
}
}
add_spacing_item (gi.grob ());
}
+void
+Note_spacing_engraver::finalize ()
+{
+ if (last_spacing_
+ && last_spacing_parent_context_
+ && last_spacing_parent_context_ == context ()->get_parent_context ())
+ {
+ SCM ccol = get_property ("currentCommandColumn");
+ Grob *column = unsmob_grob (ccol);
+
+ Pointer_group_interface::add_grob (last_spacing_,
+ ly_symbol2scm ("right-items"),
+ column);
+ }
+}
+
void
Note_spacing_engraver::stop_translation_timestep ()
{
+ if (last_spacing_
+ && last_spacing_parent_context_
+ && last_spacing_parent_context_ == context ()->get_parent_context ())
+ {
+ Grob *sep = unsmob_grob (get_property ("breakableSeparationItem"));
+ if (sep)
+ Pointer_group_interface::add_grob (last_spacing_,
+ ly_symbol2scm ("right-items"),
+ sep);
+ }
+
if (spacing_)
{
last_spacing_ = spacing_;
+ last_spacing_parent_context_ = context ()->get_parent_context ();
spacing_ = 0;
}
+
}
ADD_ACKNOWLEDGER (Note_spacing_engraver, note_column);
%type <scm> absolute_pitch
%type <scm> assignment_id
%type <scm> bare_number
+%type <scm> unsigned_number
%type <scm> bass_figure
%type <scm> figured_bass_modification
%type <scm> br_bass_figure
repeated_music:
- REPEAT simple_string bare_unsigned music alternative_music
+ REPEAT simple_string unsigned_number music alternative_music
{
- $$ = MAKE_SYNTAX ("repeat", @$, $2, scm_int2num ($3), $4, $5);
+ $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $5);
}
;
generic_prefix_music_scm {
$$ = run_music_function (PARSER, $1);
}
- | CONTEXT simple_string optional_id optional_context_mod music {
+ | CONTEXT simple_string optional_id optional_context_mod music {
$$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, $4, SCM_BOOL_F);
}
| NEWCONTEXT simple_string optional_id optional_context_mod music {
octave_check:
/**/ { $$ = SCM_EOL; }
| '=' { $$ = scm_from_int (0); }
- | '=' sub_quotes { $$ = scm_from_int ($2); }
+ | '=' sub_quotes { $$ = scm_from_int (-$2); }
| '=' sup_quotes { $$ = scm_from_int ($2); }
;
}
;
+unsigned_number:
+ bare_unsigned { $$ = scm_from_int ($1); }
+ | NUMBER_IDENTIFIER {
+ $$ = $1;
+ }
+ ;
+
+
exclamations:
{ $$ = 0; }
| exclamations '!' { $$ ++; }
{
int n = (notename_ + 2) % scale_->step_tones_.size ();
string s = ::to_string (char (n + 'a'));
- Rational qtones = alteration_ * Rational (4,1);
- int qt = int (rint (Real (qtones)));
+ Rational qtones = alteration_ * Rational (4,1);
+ int qt = int (rint (Real (qtones)));
- s += string (accname[qt + 4]);
+ s += string (accname[qt + 4]);
if (octave_ >= 0)
{
int o = octave_ + 1;
return p;
}
+Rational NATURAL_ALTERATION (0);
Rational FLAT_ALTERATION (-1, 2);
+Rational DOUBLE_FLAT_ALTERATION (-1);
Rational SHARP_ALTERATION (1, 2);
Pitch
trill_accidental_ = make_item ("TrillPitchAccidental", ev->self_scm ());
// fixme: naming -> alterations
- trill_accidental_->set_property ("alteration", scm_from_int (Rational (4)
- * p->get_alteration ()));
+ trill_accidental_->set_property ("alteration", ly_rational2scm (p->get_alteration ()));
Side_position_interface::add_support (trill_accidental_, trill_head_);
trill_head_->set_object ("accidental-grob", trill_accidental_->self_scm ());
sep_span_->set_bound (RIGHT, unsmob_grob (ccol));
sep_span_ = 0;
- for (vsize i = 0; i < last_spacings_.note_spacings_.size (); i++)
- {
- Pointer_group_interface::add_grob (last_spacings_.note_spacings_[i],
- ly_symbol2scm ("right-items"),
- column);
- }
-
if (last_spacings_.staff_spacing_
&& last_spacings_.staff_spacing_->get_column () == column)
last_spacings_.staff_spacing_->suicide ();
Pointer_group_interface::add_grob (it, ly_symbol2scm ("left-items"),
break_item_);
- if (int i = last_spacings_.note_spacings_.size ())
- {
- for (; i--;)
- Pointer_group_interface::add_grob (last_spacings_.note_spacings_[i],
- ly_symbol2scm ("right-items"),
- break_item_);
- }
- else if (last_spacings_.staff_spacing_)
+ if (!last_spacings_.note_spacings_.size ()
+ && last_spacings_.staff_spacing_)
{
SCM ri = last_spacings_.staff_spacing_->get_object ("right-items");
Grob_array *ga = unsmob_grob_array (ri);
{
penalty = parameters_.accidental_collision_;
- SCM alt = g->get_property ("alteration");
+ Rational alt = ly_scm2rational (g->get_property ("alteration"));
SCM scm_style = g->get_property ("style");
if (!scm_is_symbol (scm_style)
&& !to_boolean (g->get_property ("parenthesized"))
&& !to_boolean (g->get_property ("restore-first")))
{
/* End copy accidental.cc */
- switch (scm_to_int (alt))
- {
- case FLAT:
- case DOUBLE_FLAT:
- xp = LEFT;
- break;
- case SHARP:
- xp = 0.5 * dir_;
- break;
- case NATURAL:
- xp = -dir_;
- break;
- }
+ if (alt == FLAT_ALTERATION
+ || alt == DOUBLE_FLAT_ALTERATION)
+ xp = LEFT;
+ else if (alt == SHARP_ALTERATION)
+ xp = 0.5 * dir_;
+ else if (alt == NATURAL_ALTERATION)
+ xp = -dir_;
}
}
"measure-length "
"minimum-distances "
"right-neighbors "
- "spacing-wishes");
+ "spacing-wishes "
+
+ );
if ((options->float_nonmusical_columns_
- ||options->float_grace_columns_)
+ || options->float_grace_columns_)
&& Paper_column::when_mom (col).grace_part_)
{
return true;
return false;
/*
- A rather hairy check, but we really only want to move around
- clefs. (anything else?)
-
in any case, we don't want to move bar lines.
*/
extract_grob_set (col, "elements", elts);
{
Grob *h = gelts[j];
- /*
- ugh. -- fix staff-bar name?
- */
if (h && h->get_property ("break-align-symbol") == ly_symbol2scm ("staff-bar"))
return false;
}
}
else
{
+ Grob *min_item = 0;
+ int min_rank = INT_MAX;
+ for (vsize j = 0; j < right_items.size (); j ++)
+ {
+ int rank = dynamic_cast<Item*> (right_items[j])->get_column ()->get_rank ();
+ if (rank < min_rank)
+ {
+ min_item = right_items[j];
+ min_rank = rank;
+ }
+ }
+
c->set_object ("between-cols", scm_cons (lns,
- right_items[0]->self_scm ()));
+ min_item->self_scm ()));
/*
Set distance constraints for loose columns
{
SCM right_neighbors = Grob_array::make_array ();
Grob_array *rn_arr = unsmob_grob_array (right_neighbors);
- int min_rank = 100000; // inf.
+ int min_rank = INT_MAX;
extract_grob_set (cols[i], "spacing-wishes", wishes);
for (vsize k = wishes.size (); k--;)
if (!Paper_column::is_breakable (it) && !Paper_column::is_musical (it))
continue;
- // it->breakable || it->musical
-
/*
sloppy with typing left/right-neighbors should take list, but paper-column found instead.
*/
loose = right = re->get_column ();
}
- if (!right->get_system ())
+ if (right->get_system ())
+ ; /* do nothing */
+ else if (right->find_prebroken_piece (LEFT)
+ && right->find_prebroken_piece (LEFT)->get_system () == which)
right = right->find_prebroken_piece (LEFT);
-
+ else if (Paper_column::get_rank (which->get_bound (RIGHT)) < Paper_column::get_rank (right))
+
+ right = which->get_bound (RIGHT);
+ else
+ {
+ clique.back ()->programming_error ("Loose column does not have right side to attach to.");
+ right = which->get_bound (RIGHT);
+ }
+
Grob *common = right->common_refpoint (left, X_AXIS);
clique.push_back (right);
Drul_array<Grob *>
Stem::extremal_heads (Grob *me)
{
- const int inf = 1000000;
+ const int inf = INT_MAX;
Drul_array<int> extpos;
extpos[DOWN] = inf;
extpos[UP] = -inf;
%% Select vaticana style font.
\override KeySignature #'style = #'vaticana
- \override Accidental #'style = #'vaticana
+ \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
\override Custos #'style = #'vaticana
\override Custos #'neutral-position = #3
\override Custos #'neutral-direction = #DOWN
\Voice
\name "GregorianTranscriptionVoice"
\alias "Voice"
-
+
%% Removing ligature bracket engraver without replacing it by some
%% other ligature engraver would cause a "Junking event: `LigatureEvent'"
%% warning for every "\[" and "\]". Therefore, we make the grob
%% Select mensural style font.
\override TimeSignature #'style = #'mensural
\override KeySignature #'style = #'mensural
- \override Accidental #'style = #'mensural
+ \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
\override Custos #'style = #'mensural
\override Custos #'neutral-position = #3
\override Custos #'neutral-direction = #DOWN
mkdir -p $(outdir)/lilypond
# makeinfo is broken, it MUST have PNGs in output dir
# symlinking PNGs...
- $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir) -maxdepth 1 -name '*.png'), ln -sf ../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
- $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir)/lilypond -name '*.png'), ln -sf ../../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
+
+## cmd too long FIXME / JUNKME.
+## $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir) -maxdepth 1 -name '*.png'), ln -sf ../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
+## $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir)/lilypond -name '*.png'), ln -sf ../../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
# Links referred to by Documentation index
# BROKEN: the following makes broken symlinks
ABC2LY = $(script-dir)/abc2ly.py
CONVERT_LY = $(script-dir)/convert-ly.py
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/
+LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/ -I $(input-dir)/test/
## override from cmd line to speed up.
ANTI_ALIAS_FACTOR=2
LILYPOND_JOBS=$(if $(CPU_COUNT),-djob-count=$(CPU_COUNT),)
LILYPOND_BOOK_LILYPOND_FLAGS=--backend=eps --formats=ps,png,pdf $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=$(ANTI_ALIAS_FACTOR)
LILYPOND_BOOK_VERBOSE = --verbose
-LILYPOND_BOOK_FLAGS = --process="$(LILYPOND_BINARY) $(LILYPOND_BOOK_LILYPOND_FLAGS)" $(LILYPOND_BOOK_VERBOSE)
+LILYPOND_BOOK_FLAGS = --process="$(LILYPOND_BINARY) $(LILYPOND_BOOK_LILYPOND_FLAGS)" $(LILYPOND_BOOK_VERBOSE)
TEXINPUTS=$(top-src-dir)/tex/::
export TEXINPUTS
include $(depth)/make/stepmake.make
-# hangs on feta23
MFTRACE_FLAGS= --simplify
-EXTRA_DIST_FILES += README feta.tex
+EXTRA_DIST_FILES += README
# We don't use $(MF_FILES), because there's more .mf cruft here
FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf)\
LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
-TEXTABLES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tex)
-ENC_FILES = $(TEXTABLES:.tex=.enc)
-TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)\
- $(SAUTER_FONTS:%=$(outdir)/%.tfm)
-
+ENC_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.enc)
+TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
ENCODING_FILE=$(findstring $(<F:.mf=.enc), $(FETA_MF_FILES:.mf=.enc))
MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(outdir)/$(ENCODING_FILE),) --no-afm
$(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts.py
$(PYTHON) $< --dir=$(outdir)
-ALL_FONTS = $(FETA_FONTS) $(SAUTER_FONTS)
+ALL_FONTS = $(FETA_FONTS)
PFA_FILES = $(ALL_FONTS:%=$(outdir)/%.pfa)
# Make tfm files first, log files last,
# so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(OTF_TABLES) $(NCSB_OTFS) $(PFA_FILES) $(OTF_FILES) $(SVG_FILES)
+ALL_GEN_FILES=$(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(OTF_TABLES) $(NCSB_OTFS) $(PFA_FILES) $(OTF_FILES) $(SVG_FILES)
#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6
-INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/tex
-INSTALLATION_OUT_FILES1=$(TEXTABLES)
-
INSTALLATION_OUT_DIR2=$(local_lilypond_datadir)/fonts/otf
INSTALLATION_OUT_FILES2=$(OTF_FILES) $(NCSB_OTFS)
-INSTALLATION_OUT_DIR3=$(local_lilypond_datadir)/fonts/tfm
-INSTALLATION_OUT_FILES3=$(TFM_FILES)
-
INSTALLATION_OUT_DIR4=$(local_lilypond_datadir)/fonts/svg
INSTALLATION_OUT_FILES4=$(SVG_FILES)
##
## todo: this also depends on .tfm, FIXME.
-$(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log $(outdir)/%.tfm
+$(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
$(PYTHON) $(buildscript-dir)/mf-to-table.py --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) --lisp=$(outdir)/$(<F:.log=.lisp) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) $<
local-clean:
%
%input feta-eindelijk;
-%input feta-toevallig;
+input feta-toevallig;
%input feta-puntje;
-input feta-bolletjes;
+%input feta-bolletjes;
%input feta-arrow;
%input feta-schrift;
%input feta-schrift;
%
% feta-toevallig.mf -- implement Accidentals
%
-% source file of the Feta (Font-En-Tja) music font
-%
% (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
%
+%
+% also show in other configuration wrt staff lines.
+%
+def draw_shifted_too =
+if test > 0:
+ fet_beginchar ("shifted too", "");
+ set_char_box (0, 0,0,0);
+ currentpicture := remember_pic;
+
+ draw_staff (-2, 2, 0.5);
+ fet_endchar;
+fi;
+enddef;
+
+
+
%
% Accidentals from various sources, notably
%
%
+%
+% Naming for microtonal
+%
+% BASES SLASHES STEMS
+%
+% mirroredflat.flat.slashslash
+%
+
+% standard sharp:
+% sharp.slashslash.stemstem
+% sharp.slashslash.stem
+
+
fet_begingroup ("accidentals");
save remember_pic;
picture remember_pic;
+save sharp_beamheight;
+sharp_beamheight# := 0.3 staff_space# + stafflinethickness#;
%
% The beams of most sharps have horizontal endings (as if drawn with
%
def draw_meta_sharp (expr width, offset) =
- save beamheight, beamwidth, beamslope;
+ save beamwidth, beamslope;
save ne, nw_dist;
pair ne, nw_dist;
beamwidth := width;
- beamheight# := 0.3 staff_space# + stafflinethickness#;
- define_whole_vertical_blacker_pixels (beamheight);
+ define_whole_vertical_blacker_pixels (sharp_beamheight);
clearxy;
- beamslope = beamheight / beamwidth;
+ beamslope = sharp_beamheight / beamwidth;
pickup pencircle scaled 2 blot_diameter;
rt x2 - lft x1 = beamwidth;
- y2 - y1 = beamheight;
+ y2 - y1 = sharp_beamheight;
.5 [z1, z3] = (.5 w, offset);
x3 = x2;
- top y2 - bot y3 = beamheight;
+ top y2 - bot y3 = sharp_beamheight;
x4 = x1;
- top y1 - bot y4 = beamheight;
+ top y1 - bot y4 = sharp_beamheight;
ne = unitvector (z2 - z1);
nw_dist = (ne rotated 90) * blot_diameter;
enddef;
-fet_beginchar ("Sharp", "2");
+fet_beginchar ("Sharp", "sharp");
save stem, stemx, stemwidth;
save outer_space, interbeam;
draw_staff (-2, 2, 0);
fet_endchar;
+draw_shifted_too;
-if test > 0:
- fet_beginchar ("Sharp", "2");
-
- set_char_box (0, 1.1 staff_space#,
- 1.5 staff_space#, 1.5 staff_space#);
-
- currentpicture := remember_pic;
-
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
-
-
-fet_beginchar ("1/2 Sharp", "1");
+fet_beginchar ("1/2 Sharp", "sharp.slashslash.stem");
save stem, stemwidth;
save outer_space, interbeam;
draw_staff (-2, 2, 0);
fet_endchar;
+draw_shifted_too;
-if test > 0:
- fet_beginchar ("1/2 Sharp", "1");
+fet_beginchar ("Sharp (3 beams)", "sharp.slashslashslash.stemstem");
+ save stem, stemx, stemwidth;
+ save outer_space, interbeam;
+ save sharp_beamheight;
- set_char_box (0, 0.7 staff_space#,
- 1.5 staff_space#, 1.5 staff_space#);
+ sharp_beamheight# := 0.22 staff_space# + stafflinethickness#;
- currentpicture := remember_pic;
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
+ stemwidth# := stafflinethickness# + .05 staff_space#;
+ define_whole_blacker_pixels (stemwidth);
+ interbeam := 1.2 staff_space_rounded;
+
+ set_char_box (0, 1.1 staff_space#,
+ 1.5 staff_space#, 1.5 staff_space#);
-fet_beginchar ("3/4 Sharp", "3");
+ stem := 7 / 16 * w;
+ stemx := hround stem;
+ outer_space := hround ((w - stemx - stemwidth) / 2);
+
+ w := 2 outer_space + stemx + stemwidth;
+ d := d - feta_space_shift;
+
+ draw_meta_sharp (.88 w, -.5 interbeam);
+ draw_meta_sharp (w, 0);
+ draw_meta_sharp (.88 w, -.5 interbeam + vround interbeam);
+
+ pickup pencircle scaled stemwidth;
+
+ lft x5 = lft x6 = outer_space;
+ lft x7 = lft x8 = outer_space + stemx;
+ bot y5 = -d;
+ top y6 = vround (1.5 staff_space - stem * beamslope);
+ bot y7 = -top y6 + feta_space_shift;
+ top y8 = h;
+
+ labels (5, 6, 7, 8);
+
+ draw_gridline (z5, z6, stemwidth);
+ draw_gridline (z7, z8, stemwidth);
+
+ remember_pic := currentpicture;
+
+ draw_staff (-2, 2, 0);
+fet_endchar;
+
+draw_shifted_too;
+
+fet_beginchar ("1/2 Sharp (3 beams)", "sharp.slashslashslash.stem");
+ save stem, stemx, stemwidth;
+ save outer_space, interbeam;
+ save sharp_beamheight;
+
+ sharp_beamheight# := 0.22 staff_space# + stafflinethickness#;
+
+ stemwidth# := stafflinethickness# + .05 staff_space#;
+ define_whole_blacker_pixels (stemwidth);
+
+ interbeam := 1.2 staff_space_rounded;
+
+ set_char_box (0, 0.95 staff_space#,
+ 1.3 staff_space#, 1.3 staff_space#);
+
+ stem := 7 / 16 * w;
+ outer_space := hround ((w - stemwidth) / 2);
+ w := 2 outer_space + stemwidth;
+ d := d - feta_space_shift;
+
+ draw_meta_sharp (.8 w, -.5 interbeam);
+ draw_meta_sharp (w, 0);
+ draw_meta_sharp (.8 w, -.5 interbeam + vround interbeam);
+
+ pickup pencircle scaled stemwidth;
+
+ lft x5 = lft x6 = outer_space;
+ top y6 = vround (1.5 staff_space - .5 stem);
+ bot y5 = -top y6 + feta_space_shift;
+ labels (5, 6);
+
+
+ draw_gridline (z5, z6, stemwidth);
+
+
+ remember_pic := currentpicture;
+
+ draw_staff (-2, 2, 0);
+fet_endchar;
+
+draw_shifted_too;
+
+
+fet_beginchar ("3/4 Sharp", "sharp.slashslash.stemstemstem");
save stem, stemx, stemwidth;
save outer_space, interbeam;
draw_staff (-2, 2, 0);
fet_endchar;
+draw_shifted_too;
-if test > 0:
- fet_beginchar ("3/4 Sharp", "3");
-
- set_char_box (0, 1.6 staff_space#,
- 1.5 staff_space#, 1.5 staff_space#);
-
- currentpicture := remember_pic;
-
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
%
% The stems of the natural are brushed (at least, in Barenreiter SCS)
%
-fet_beginchar ("Natural", "0");
+fet_beginchar ("Natural", "natural");
save stemwidth, top_stem_thick;
save ne, pat_top, pat_bottom;
pair ne;
draw_staff (-2, 2, 0);
fet_endchar;
-
-if test > 0:
- fet_beginchar ("Natural", "0");
- set_char_box (0, 2/3 staff_space#,
- 1.5 staff_space#, 1.5 staff_space#);
-
- currentpicture := remember_pic;
-
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
+draw_shifted_too;
%
% unfortunately, 600dpi is not enough to show the brush of the stem.
%
-fet_beginchar ("Flat", "-2");
+fet_beginchar ("Flat", "flat");
set_char_box (1.2 stafflinethickness#, .8 staff_space#,
0.6 staff_space#, 1.9 staff_space#);
draw_staff (-2, 2, 0);
fet_endchar;
+draw_shifted_too;
-if test > 0:
- fet_beginchar ("Flat", "-2");
- set_char_box (1.2 stafflinethickness#, .8 staff_space#,
- 0.6 staff_space#, 1.9 staff_space#);
+fet_beginchar ("Flat (slashed)", "flat.slash");
+ set_char_box (1.2 stafflinethickness#, .8 staff_space#,
+ 0.6 staff_space#, 1.9 staff_space#);
- currentpicture := remember_pic;
+ draw_meta_flat (0, w, 0.31 staff_space);
+ clearxy;
+ save slope, slash_width;
+ slope = 0.5;
+ slash_width = w;
+ z1 = (0, h / 2);
+ z2 = z1 - (slash_width, slash_width * slope)/2;
+ z3 = z1 + (slash_width, slash_width * slope)/2;
+
+ pickup pencircle scaled 1.5 stafflinethickness;
+ draw z2 .. z3;
+ labels (1, 2, 3);
+ remember_pic := currentpicture;
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
+ draw_staff (-2, 2, 0);
+fet_endchar;
+
+fet_beginchar ("Flat (slashed twice)", "flat.slashslash");
+ set_char_box (1.2 stafflinethickness#, .8 staff_space#,
+ 0.6 staff_space#, 1.9 staff_space#);
+
+ draw_meta_flat (0, w, 0.31 staff_space);
+ clearxy;
+ save slope, slash_width;
+
+ slope = 0.5;
+ slash_width = w;
+ pickup pencircle scaled 1.5 stafflinethickness;
+
+ z1 = (0, 5/12 h);
+ z2 = (0, 2/3 h);
+ draw z1 - (slash_width, slash_width * slope)/2
+ .. z1 + (slash_width, slash_width * slope)/2;
+ draw z2 - (slash_width, slash_width * slope)/2
+ .. z2 + (slash_width, slash_width * slope)/2;
+ labels (1, 2);
+ remember_pic := currentpicture;
+
+ draw_staff (-2, 2, 0);
+fet_endchar;
+
+fet_beginchar ("Flatflat (mirrored)", "mirroredflat.flat");
+ set_char_box (0, 1.6 staff_space#,
+ 0.6 staff_space#, 1.9 staff_space#);
+ draw_meta_flat (0, w/2, 0.31 staff_space);
+ currentpicture := currentpicture xscaled -1;
+ draw_meta_flat (0, w/2, 0.31 staff_space);
+
+ currentpicture := currentpicture shifted (w/2,0);
+ penlabels (range 0 thru 11);
-fet_beginchar ("Semi flat", "-1");
+ remember_pic := currentpicture;
+
+ draw_staff (-2, 2, 0);
+fet_endchar;
+
+draw_shifted_too;
+
+
+
+fet_beginchar ("Semi flat", "mirroredflat");
set_char_box (1.2 stafflinethickness#, .8 staff_space#,
0.6 staff_space#, 1.9 staff_space#);
fet_endchar;
-fet_beginchar ("Double Flat", "-4");
+fet_beginchar ("Double Flat", "flatflat");
save left_wid, overlap, right_wid;
left_wid = .7;
fet_endchar;
-fet_beginchar ("3/4 Flat", "-3");
+fet_beginchar ("3/4 Flat", "flatflat.slash");
save left_wid, overlap, right_wid;
left_wid = .7;
draw_staff (-2, 2, 0);
fet_endchar;
+draw_shifted_too;
-if test > 0:
- fet_beginchar ("3/4 Flat", "-3");
- save left_wid, overlap, right_wid;
-
- left_wid = .7;
- right_wid = .8;
- overlap = .05;
-
- set_char_box (1.2 stafflinethickness#,
- (left_wid + right_wid - overlap) * staff_space#,
- .6 staff_space#, 1.9 staff_space#);
-
- currentpicture := remember_pic;
-
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
-
-
-fet_beginchar ("Double Sharp", "4");
+fet_beginchar ("Double Sharp", "doublesharp");
save klaverblad, klaversteel;
save pat;
path pat;
draw_staff (-2, 2, 0);
fet_endchar;
-
-if test > 0:
- fet_beginchar ("Double Sharp", "4");
- set_char_box (0, staff_space#,
- .5 staff_space#, .5 staff_space#);
-
- currentpicture := remember_pic;
-
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
-
+draw_shifted_too;
def draw_paren =
save leftindent;
draw_staff (-2, 2, 0);
fet_endchar;
-
-if test > 0:
- fet_beginchar ("Right Parenthesis", "rightparen");
- draw_paren;
- penlabels (1, 2, 3);
-
- remember_pic := currentpicture;
-
- draw_staff (-2, 2, 0.5);
- fet_endchar;
-fi;
+draw_shifted_too;
fet_beginchar ("Left Parenthesis", "leftparen");
set_char_box (charwd, charbp, chardp, charht);
fet_endchar;
-
fet_endgroup ("accidentals");
+++ /dev/null
-% display all feta chars in a pretty picture
-% GNU LilyPond
-% (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
-%
-% urg: fool ls-latex
-\def\urg{
-\title{The Feta font}
-\author{JCN}
-\begin{document}
-}
-
-
-\parindent0pt
-\nopagenumbers
-\newcount\n
-\newcount\i
-
-\font\fetatwenty = feta20
-\font\fetanumber = feta-nummer12
-\font\fetafinger = feta-nummer5
-\font\fetadyn = feta-din10 scaled \magstep 2
-\font\titlefont = cmbx12 scaled \magstep 4
-\font\subtitle = cmr9
-
-\def\lilyfooter{Lily was here}
-\def\setchar#1#2{\hbox to\charwidth{\hss{#1\char#2}\hss}}
-
-\def\charsperline{6}
-\def\charheight{55pt}
-\def\charwidth{60pt}
-
-\def\listfont#1#2#3{
- \n=#2
- \advance\n by-1
- \advance\n by-\charsperline
- \loop\ifnum\n<#3
- \advance\n by\charsperline
- \i=0
- {\vbox to\charheight{\vss\centerline{
- {\loop\ifnum\i<\charsperline
- \advance\i by1
- \advance\n by1
- {\setchar{#1}{\number\n}}
- \repeat}}}}\repeat}
-
-\def\title#1{\centerline{\titlefont #1}}
-\def\author#1{\centerline{#1}}
-
-\title{FETA}
-
-\centerline{\subtitle (definitely not an abbreviation for Font-En-Tja)}
-
-\author{Han-Wen Nienhuys and Jan Nieuwenhuizen}
-
-
-\vskip5mm
-
-\listfont{\fetatwenty}{0}{105}
-% urg
-\vskip-\charheight
-\listfont{\fetanumber}{48}{58}
-\vskip-\charheight
-\listfont{\fetafinger}{48}{58}
-\vskip-\charheight
-\listfont{\fetadyn}{0}{6}
-\vskip-\charheight
-
-\lilyfooter
-
-\bye
"AccidentalCautionary #'font-size = #-2", str)
str = re.sub ("Accidental\s*#'cautionary-style\s*=\s*#'parentheses",
"AccidentalCautionary #'parenthesized = ##t", str)
-
str = re.sub ("([A-Za-z]+)\s*#'cautionary-style\s*=\s*#'parentheses",
r"\1 #'parenthesized = ##t", str)
str = re.sub ("([A-Za-z]+)\s*#'cautionary-style\s*=\s*#'smaller",
r"\1 #'font-size = #-2", str)
-
+
return str
-conversions.append (((2, 11, 5), conv, """ly:clone-parser -> ly:parser-clone"""))
+conversions.append (((2, 11, 5), conv, """deprecate cautionary-style. Use AccidentalCautionary properties"""))
+
+
+
+def conv (str):
+
+ def sub_acc_name (m):
+ idx = int (m.group (1).replace ('M','-'))
+
+ return ["accidentals.doublesharp",
+ "accidentals.sharp.slashslash.stemstemstem",
+ "accidentals.sharp",
+ "accidentals.sharp.slashslash.stem",
+ "accidentals.natural",
+ "accidentals.mirroredflat",
+ "accidentals.flat",
+ "accidentals.mirroredflat.flat",
+ "accidentals.flatflat"][4-idx]
+
+ str = re.sub (r"accidentals[.](M?[-0-9]+)",
+ sub_acc_name, str)
+ str = re.sub (r"(KeySignature|Accidental[A-Za-z]*)\s*#'style\s*=\s*#'([a-z]+)",
+ r"\1 #'glyph-name-alist = #alteration-\2-glyph-name-alist", str)
+
+ return str
+
+conversions.append (((2, 11, 6), conv, """Rename accidental glyphs, use glyph-name-alist."""))
0.3
0.6)
(make-musicglyph-markup
- (format "accidentals.~a"
- (inexact->exact (* 4 alteration)))))))
+ (assoc-get alteration standard-alteration-glyph-name-alist "")))))
(define (accidental->markup alteration)
"Return accidental markup for ALTERATION."
(ly:add-interface
'trill-pitch-accidental-interface
"An accidental for trill pitch"
- '(accidentals))
+ '()
+ )
(ly:add-interface
'rhythmic-grob-interface
property.")
(gap ,ly:dimension? "Size of a gap in a variable symbol.")
(gap-count ,integer? "Number of gapped beams for tremolo.")
+ (glyph-name-alist ,list? "Alist of key-string pairs.")
(grow-direction ,ly:dir? "Crescendo or decrescendo?")
(hair-thickness ,number? "Thickness of the thin line in a bar line.")
(head-direction ,ly:dir? "Are the note heads left or right in a semitie?")
note heads in collisions, even if they have different note heads. The
smaller of the two heads will be rendered invisible. This used
polyphonic guitar notation. The value of this setting is used by
-@internalsref{note-collision-interface} .")
+@internalsref{note-collision-interface} .
+merge-differently-headed only applies to opposing stem dirs
+(ie. Voice 1 & 2).")
(merge-differently-dotted ,boolean? "Merge note heads in
collisions, even if they have a different number of dots. This normal
-notation for some types of polyphonic music. ")
+notation for some types of polyphonic music.
+merge-differently-dotted only applies to opposing stem dirs
+(ie. Voice 1 & 2).")
(minimum-length-fraction ,number? "Minimum length of ledger line as fraction of note head size.")
(minimum-distance ,ly:dimension? "Minimum distance between rest
and notes or beam.")
(Accidental
. (
(avoid-slur . inside)
+ (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+ (alteration . ,accidental-interface::calc-alteration)
(stencil . ,ly:accidental-interface::print)
- (stencils . ,ly:accidental-interface::calc-stencils)
(after-line-breaking
. ,ly:accidental-interface::after-line-breaking)
(meta . ((class . Item)
. (
(avoid-slur . inside)
(parenthesized . #t)
+ (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+ (alteration . ,accidental-interface::calc-alteration)
(stencil . ,ly:accidental-interface::print)
- (stencils . ,ly:accidental-interface::calc-stencils)
(after-line-breaking
. ,ly:accidental-interface::after-line-breaking)
(meta . ((class . Item)
,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self)))))
(self-alignment-X . ,CENTER)
(font-size . -2)
+ (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+ (alteration . ,accidental-interface::calc-alteration)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(direction . ,UP)
(staff-padding . 0.25)
(outside-staff-priority . 0)
(script-priority . 0)
- (stencils . ,ly:accidental-interface::calc-stencils)
(side-axis . ,X)
(meta . ((class . Item)
(interfaces . (side-position-interface
(X-offset . ,ly:side-position-interface::x-aligned-side)
(direction . ,LEFT)
(stencil . ,ly:accidental-interface::print)
- (stencils . ,ly:accidental-interface::calc-stencils)
-
+ (glyph-name-alist . ,standard-alteration-glyph-name-alist)
(after-line-breaking . ,ly:accidental-interface::after-line-breaking)
(side-axis . ,X)
(meta . ((class . Item)
(KeyCancellation
. (
(stencil . ,ly:key-signature-interface::print)
+ (glyph-name-alist . ,cancellation-glyph-name-alist)
(space-alist . (
(time-signature . (extra-space . 1.25))
(staff-bar . (extra-space . 0.6))
. (
(stencil . ,ly:key-signature-interface::print)
(avoid-slur . inside)
+ (glyph-name-alist . ,standard-alteration-glyph-name-alist)
(space-alist . (
(time-signature . (extra-space . 1.15))
(staff-bar . (extra-space . 1.1))
(font-size . -4)
(side-axis . ,X)
(stencil . ,ly:accidental-interface::print)
- (stencils . ,ly:accidental-interface::calc-stencils)
+ (glyph-name-alist . ,standard-alteration-glyph-name-alist)
(meta . ((class . Item)
(interfaces . (item-interface
trill-pitch-accidental-interface
(define-builtin-markup-command (doublesharp layout props) ()
"Draw a double sharp symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.4")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get 1 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (sesquisharp layout props) ()
"Draw a 3/2 sharp symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.3")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get 3/4 standard-alteration-glyph-name-alist ""))))
+
(define-builtin-markup-command (sharp layout props) ()
"Draw a sharp symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.2")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get 1/2 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (semisharp layout props) ()
"Draw a semi sharp symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.1")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get 1/4 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (natural layout props) ()
"Draw a natural symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.0")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get 0 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (semiflat layout props) ()
"Draw a semiflat."
- (interpret-markup layout props (markup #:musicglyph "accidentals.M1")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get -1/4 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (flat layout props) ()
"Draw a flat symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.M2")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get -1/2 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (sesquiflat layout props) ()
"Draw a 3/2 flat symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.M3")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get -3/4 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (doubleflat layout props) ()
"Draw a double flat symbol."
- (interpret-markup layout props (markup #:musicglyph "accidentals.M4")))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get -1 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (with-color layout props color arg) (color? markup?)
"Draw @var{arg} in color specified by @var{color}"
(define-builtin-markup-command (musicglyph layout props glyph-name) (string?)
"This is converted to a musical symbol, e.g. @code{\\musicglyph
-#\"accidentals.0\"} will select the natural sign from the music font.
+#\"accidentals.natural\"} will select the natural sign from the music font.
See @usermanref{The Feta font} for a complete listing of the possible glyphs."
(ly:font-get-glyph
(ly:paper-get-font layout (cons '((font-encoding . fetaMusic))
(num-x (interval-widen (ly:stencil-extent number-stencil X)
(* mag 0.2)))
(num-y (ly:stencil-extent number-stencil Y))
- (slash-stencil
- (ly:make-stencil
- `(draw-line
- ,thickness
- ,(car num-x) ,(- (interval-center num-y) dy)
- ,(cdr num-x) ,(+ (interval-center num-y) dy))
- num-x num-y
- )))
-
- (ly:stencil-add number-stencil
- (cond
- ((= num 5) (ly:stencil-translate slash-stencil
- ;;(cons (* mag -0.05) (* mag 0.42))
- (cons (* mag -0.00) (* mag -0.07))
-
- ))
- ((= num 7) (ly:stencil-translate slash-stencil
- ;;(cons (* mag -0.05) (* mag 0.42))
- (cons (* mag -0.00) (* mag -0.15))
-
- ))
-
- (else slash-stencil)))
- ))
+ (is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
+
+ (slash-stencil
+ (if is-sane
+ (ly:make-stencil
+ `(draw-line
+ ,thickness
+ ,(car num-x) ,(- (interval-center num-y) dy)
+ ,(cdr num-x) ,(+ (interval-center num-y) dy))
+ num-x num-y)
+ #f)))
+
+ (set! slash-stencil
+ (cond
+ ((not (ly:stencil? slash-stencil)) #f)
+ ((= num 5) (ly:stencil-translate slash-stencil
+ ;;(cons (* mag -0.05) (* mag 0.42))
+ (cons (* mag -0.00) (* mag -0.07))
+
+ ))
+ ((= num 7) (ly:stencil-translate slash-stencil
+ ;;(cons (* mag -0.05) (* mag 0.42))
+ (cons (* mag -0.00) (* mag -0.15))
+
+ ))
+
+ (else slash-stencil)))
+
+ (if slash-stencil
+ (set! number-stencil
+ (ly:stencil-add number-stencil slash-stencil))
+
+ (ly:warning "invalid number for slashed digit ~a" num))
+
+
+ number-stencil))
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; the note command.
(let*
((xext (ly:stencil-extent dump-me X))
(yext (ly:stencil-extent dump-me Y))
- (left-overshoot (ly:get-option 'eps-box-padding))
+ (padding (ly:get-option 'eps-box-padding))
+ (left-overshoot (if (number? padding)
+ (* -1 padding (ly:output-def-lookup paper 'mm))
+ #f))
(bbox
(map
(lambda (x)
(debug-skylines #f "debug skylines")
(delete-intermediate-files #f
"delete unusable PostScript files")
- (dump-signatures #f "dump output signatures of each system")
+ (dump-profile #f "dump timing information for each file")
(dump-tweaks #f "dump page layout and tweaks for each score having the tweak-key layout property set.")
+ (dump-signatures #f "dump output signatures of each system")
+
+ (eps-box-padding #f "Pad EPS bounding box left edge by this much to guarantee alignment between systems")
+
(gs-load-fonts #f
"load fonts via Ghostscript.")
+ (gui #f "running from gui; redirect stderr to log file")
+
(include-book-title-preview #t "include book-titles in preview images.")
(include-eps-fonts #t "Include fonts in separate-system EPS files.")
(job-count #f "Process in parallel")
-
- (eps-box-padding #f "Pad EPS bounding box left edge by this much to guarantee alignment between systems")
-
- (gui #f "running from gui; redirect stderr to log file")
(log-file #f "redirect output to log FILE.log")
+
(old-relative #f
"relative for simultaneous music works
similar to chord syntax")
(,symbol? . "symbol")
(,vector? . "vector")))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; timing
+
+(define (profile-measurements)
+ (let* ((t (times))
+ (stats (gc-stats)))
+
+ (list
+ (- (+ (tms:utime t)
+ (tms:stime t))
+ (ly:assoc-get 'gc-time-taken stats))
+
+ ;; difficult to put memory amount stats into here.
+
+ )))
+
+(define (dump-profile name last this)
+ (let*
+ ((outname (format "~a.profile" (basename name ".ly")))
+ (diff (map (lambda (y) (apply - y)) (zip this last))))
+
+ (display diff)
+ (ly:progress "\nWriting timing to ~a..." outname)
+ (format (open-file outname "w")
+ "time: ~a"
+ (car diff))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; debug mem leaks
))
(let* ((failed '())
- (first #t)
+ (start-measurements #f)
(handler (lambda (key failed-file)
(set! failed (append (list failed-file) failed)))))
(for-each
(lambda (x)
- ;; We don't carry info across file boundaries
- (if first
- (set! first #f)
- (gc))
-
+ (gc)
+ (set! start-measurements (profile-measurements))
(lilypond-file handler x)
+ (if (ly:get-option 'dump-profile)
+ (dump-profile x start-measurements (profile-measurements)))
+
+
(ly:clear-anonymous-modules)
(if (ly:get-option 'debug-gc)
(dump-gc-protects)
(define-public darkmagenta '(0.5 0.0 0.5))
(define-public darkyellow '(0.5 0.5 0.0))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; key signature
+
+
+(define-public (key-signature-interface::alteration-position step alter c0-position)
+ ;; TODO: memoize - this is mostly constant.
+
+ ;; fes, ges, as and bes typeset in lower octave
+ (define FLAT_TOP_PITCH 2)
+
+ ;; ais and bis typeset in lower octave
+ (define SHARP_TOP_PITCH 4)
+
+ (if (pair? step)
+ (+ (cdr step) (* (car step) 7) c0-position)
+ (let*
+ ((from-bottom-pos (modulo (+ 4 49 c0-position) 7))
+ (p step)
+ (c0 (- from-bottom-pos 4)))
+
+ (if
+ (or (and (< alter 0) (or (> p FLAT_TOP_PITCH) (> (+ p c0) 4)) (> (+ p c0) 1))
+ (and (> alter 0) (or (> p SHARP_TOP_PITCH) (> (+ p c0) 5)) (> (+ p c0) 2))
+ )
+
+ ;; Typeset below c_position
+ (set! p (- p 7)))
+
+ ;; Provide for the four cases in which there's a glitch
+ ;; it's a hack, but probably not worth
+ ;; the effort of finding a nicer solution.
+ ;; --dl.
+ (cond
+ ((and (= c0 2) (= p 3) (> alter 0))
+ (set! p (- p 7)))
+ ((and (= c0 -3) (= p -1) (> alter 0))
+ (set! p (+ p 7)))
+ ((and (= c0 -4) (= p -1) (< alter 0))
+ (set! p (+ p 7)))
+ ((and (= c0 -2) (= p -3) (< alter 0))
+ (set! p (+ p 7))))
+
+ (+ c0 p))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; accidentals
+
+(define-public (accidental-interface::calc-alteration grob)
+ (ly:pitch-alteration (ly:event-property (event-cause grob) 'pitch)))
+
+
+(define-public cancellation-glyph-name-alist
+ '((0 . "accidentals.natural")))
+
+(define-public standard-alteration-glyph-name-alist
+ '(
+ ;; ordered for optimal performance.
+ (0 . "accidentals.natural")
+ (-1/2 . "accidentals.flat")
+ (1/2 . "accidentals.sharp")
+
+ (1 . "accidentals.doublesharp")
+ (-1 . "accidentals.flatflat")
+
+ (3/4 . "accidentals.sharp.slashslash.stemstemstem")
+ (1/4 . "accidentals.sharp.slashslash.stem")
+ (-1/4 . "accidentals.mirroredflat")
+ (-3/4 . "accidentals.mirroredflat.flat")
+ ))
+
+(define-public makam-alteration-glyph-name-alist
+ '((1 . "accidentals.doublesharp")
+ (8/9 . "accidentals.sharp.slashslashslash.stemstem")
+ (5/9 . "accidentals.sharp.slashslashslash.stem")
+ (4/9 . "accidentals.sharp")
+ (1/9 . "accidentals.sharp.slashslash.stem")
+ (0 . "accidentals.natural")
+ (-1/9 . "accidentals.mirroredflat")
+ (-4/9 . "accidentals.flat.slash")
+ (-5/9 . "accidentals.flat")
+ (-8/9 . "accidentals.flat.slashslash")
+ (-1 . "accidentals.flatflat")
+ ))
+
+(define-public alteration-hufnagel-glyph-name-alist
+ '((1/2 . "accidentals.hufnagel-1")
+ (0 . "accidentals.vaticana0")
+ (-1/2 . "accidentals.mensural1")))
+
+(define-public alteration-medicaea-glyph-name-alist
+ '((1/2 . "accidentals.medicaea-1")
+ (0 . "accidentals.vaticana0")
+ (-1/2 . "accidentals.mensural1")))
+
+(define-public alteration-vaticana-glyph-name-alist
+ '((1/2 . "accidentals.vaticana-1")
+ (0 . "accidentals.vaticana0")
+ (-1/2 . "accidentals.mensural1")))
+
+(define-public alteration-mensural-glyph-name-alist
+ '((1/2 . "accidentals.mensural-1")
+ (0 . "accidentals.vaticana0")
+ (-1/2 . "accidentals.mensural1")))
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; * Pitch Trill Heads
;; * Parentheses
(define-public (parentheses-item::calc-parenthesis-stencils grob)
- (let* (
- (font (ly:grob-default-font grob))
+ (let* ((font (ly:grob-default-font grob))
(lp (ly:font-get-glyph font "accidentals.leftparen"))
- (rp (ly:font-get-glyph font "accidentals.rightparen"))
- )
+ (rp (ly:font-get-glyph font "accidentals.rightparen")))
(list lp rp)))
(/ (round (* 10000 num)) 10000))
(define (str4 num)
- (format #f "~f" (round4 num)))
+ (if (or (nan? num) (inf? num))
+ (begin
+ (ly:warning (_ "Found infinity or nan in output. Substituting 0.0"))
+ "0.0")
+ (format #f "~f" (round4 num))))
(define (number-pair->string4 numpair)
- (format #f "~f ~f" (round4 (car numpair)) (round4 (cdr numpair))))
+ (string-append (str4 (car numpair))
+ " "
+ (str4 (cdr numpair))))
(define (numbers->string4 numlist)
(string-join (map str4 numlist) " "))
authors = ('Jan Nieuwenhuizen <janneke@gnu.org>',
'Han-Wen Nienhuys <hanwen@xs4all.nl>')
-
################################################################
def exit (i):
if global_options.verbose:
metavar=_ ("DIR"),
action='append', dest='include_path',
default=[os.path.abspath (os.getcwd ())])
+
+ p.add_option ('--left-padding',
+ metavar=_("PAD"),
+ dest="padding_mm",
+ help="Pad left side of music to align music inspite of uneven bar numbers. (in mm)",
+ type="float",
+ default=3.0)
p.add_option ("-o", '--output', help=_ ("write output to DIR"),
metavar=_ ("DIR"),
action='store', dest='output_name',
default='')
+
p.add_option ('-P', '--process', metavar=_ ("COMMAND"),
help = _ ("process ly_files using COMMAND FILE..."),
action='store',
#(define dump-extents #t)
%(font_dump_setting)s
%(paper_string)s
+ force-assignment = #""
+ line-width = #(- line-width (* mm %(padding_mm)f))
}
\layout {
'\n ') % vars ()
preamble_string = string.join (compose_dict[PREAMBLE],
'\n ') % override
-
+ padding_mm = global_options.padding_mm
font_dump_setting = ''
if FONTLOAD in self.option_dict:
font_dump_setting = '#(define-public force-eps-font-include #t)\n'
return args
+def psfonts_warning (options, basename):
+ if options.format in (TEXINFO, LATEX):
+ psfonts_file = os.path.join (options.output_name, basename + '.psfonts')
+ output = os.path.join (options.output_name, basename + '.dvi' )
+
+ if not options.create_pdf:
+ if not options.psfonts:
+ warning (_ ("option --psfonts not used"))
+ warning (_ ("processing with dvips will have no fonts"))
+ else:
+ progress ('\n')
+ progress (_ ("DVIPS usage:"))
+ progress ('\n')
+ progress (" dvips -h %(psfonts_file)s %(output)s" % vars ())
+ progress ('\n')
+
def main ():
# FIXME: 85 lines of `main' macramee??
files = do_options ()
if global_options.format in (TEXINFO, LATEX):
## prevent PDF from being switched on by default.
global_options.process_cmd += ' --formats=eps '
-
- if (global_options.format in (TEXINFO, LATEX)
- and global_options.create_pdf):
- global_options.process_cmd += "--pdf -dinclude-eps-fonts -dgs-load-fonts "
+ if global_options.create_pdf:
+ global_options.process_cmd += "--pdf -dinclude-eps-fonts -dgs-load-fonts "
if global_options.verbose:
global_options.process_cmd += " --verbose "
- global_options.process_cmd += " -dread-file-list -deps-box-padding=-3 "
+ if global_options.padding_mm:
+ global_options.process_cmd += " -deps-box-padding=%f " % global_options.padding_mm
+
+ global_options.process_cmd += " -dread-file-list "
identify ()
except Compile_error:
exit (1)
- if global_options.format in (TEXINFO, LATEX):
- psfonts_file = os.path.join (global_options.output_name, basename + '.psfonts')
- output = os.path.join (global_options.output_name, basename + '.dvi' )
-
- if not global_options.psfonts and not global_options.create_pdf:
- warning (_ ("option --psfonts not used"))
- warning (_ ("processing with dvips will have no fonts"))
- else:
- progress ('\n')
- progress (_ ("DVIPS usage:"))
- progress ('\n')
- progress (" dvips -h %(psfonts_file)s %(output)s" % vars ())
- progress ('\n')
+ psfonts_warning (global_options, basename)
inputs = note_input_file ('')
inputs.pop ()
$(outdir)/%: %.m4
$(M4) $< > $@
-%.dep:
- touch $@
-
%.gz: %
gzip -c9 $< > $@
-
# Don't remove $(outdir)/.log's. Logs are a target!
# we want to see botched results as well.
mv $(basename $<).dvi $(outdir)
rm $(basename $<).*gf
-# This is not metafont, this is feta-specific
-$(outdir)/%.log: %.mf
- MFINPUTS=$(src-dir) $(METAFONT) "\mode:=$(MFMODE); nonstopmode; input $<;"
- mv $(@F) $@
- rm $(basename $(@F)).*gf
-
-$(outdir)/%.tfm $(outdir)%.log: %.mf
+$(outdir)/%.tfm $(outdir)/%.log: %.mf
MFINPUTS=$(src-dir) $(METAFONT) "\mode:=$(MFMODE); nonstopmode; input $<;"
# Let's keep this log output, it saves another mf run.
mv $(basename $(@F)).log $(basename $(@F)).tfm $(outdir)
- rm $(basename $(@F)).*gf
-
-$(outdir)/%.$(XPM_RESOLUTION)gf: %.mf
- MFINPUTS=$(src-dir) $(METAFONT) "\\mode=$(XPM_MODE); \\input $<"
-# Let's keep this log output, it saves another mf run.
- mv $(@F) $(basename $(@F)).log $(basename $(@F)).tfm $(outdir)
-
-$(outdir)/%.$(XPM_RESOLUTION)pk: $(outdir)/%.$(XPM_RESOLUTION)gf
- gftopk $< $@
+ rm -f $(basename $(@F)).*gf $(basename $(@F)).*pk
MFTRACE_FORMATS = pfa pfb svg
-mv $(basename $(@F)).pfa $(outdir)
-mv $(basename $(@F)).pfb $(outdir)
-mv $(basename $(@F)).svg $(outdir)
-
-#%.afm:
-# $(SHELL) $(depth)/buildscripts/tfmtoafm.sh $(shell basename $@ .afm)
-# mv $@ $@.in
dvi: $(DVI_FILES)
-pks: $(addprefix $(outdir)/, $(XPM_FONTS:%=%.$(XPM_RESOLUTION)pk))
-
-xpms: $(addprefix $(outdir)/, $(XPM_FONTS:%=%.afm)) pks
- $(foreach i, $(XPM_FONTS), $(SHELL) $(depth)/buildscripts/mf-to-xpms.sh $(i) && ) true
-
pfb: $(PFB_FILES)
DVI_FILES += $(MF_DVI_FILES)
TFM_FILES += $(MF_TFM_FILES)
-# XPM_MODE=sun
-# XPM_RESOLUTION=85
-
-# XPM_MODE=declarge
-# XPM_RESOLUTION=100
-
-XPM_MODE=ibmvga
-XPM_RESOLUTION=110
-
TEST_EXECUTABLE = $(outdir)/test-$(NAME)
TEST_MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/library.a, $(TEST_MODULE_LIBS)))
-TEST_LOADLIBES = $(TEST_MODULE_LIBES) $(LOADLIBES) -lboost_unit_test_framework
+TEST_LOADLIBES = $(TEST_MODULE_LIBES) $(LOADLIBES)