BUGS:
+ +
+ > \notes{ a \< b \cr }
+ >
+ > work but
+ >
+ > \notes{ a \< b \! }
+ >
+ > give a parse error?
+
+
+ * if possible, it might be nice for a warning to appear if someone does
+ > \translator with no name and without assigning it to an
+identifier. possible, it might be nice for a warning to appear if
+someone does
+ > \translator with no name and without assigning it to an
+identifier.
+
+ * space after bars?
+
+ * [/3 c8 c16 c c c]/1
+
+ * I see that \prallprall and \prallmordent are identical. I think this is a
+ mistake, that \prallprall should not have the vertical line.
+ This can be fixex by removing the line
+ > draw_mordent(twidth-0.5toverlap);
+ from the definition of \prallprall in mf/feta-slag.mf (see below)
+
+ * fix singleStaffBracket
+
+ * repeat bars: need distance after ":|" and before "|:"
+
+ - The time signature warnings still remain, will be fixed later.
+
* fix \n after proccing
Summary of minor spelling irregularities:
****
+ > lbheel = \script { "bheel" 0 0 -1 0 0 }
+> rbheel = \script { "bheel" 0 0 1 0 0 }
+> lbtoe = \script { "btoe" 0 0 -1 0 0 }
+> rbtoe = \script { "btoe" 0 0 1 0 0 }
+> lfheel = \script { "fheel" 0 0 -1 0 0 }
+> rfheel = \script { "fheel" 0 0 1 0 0 }
+> lftoe = \script { "ftoe" 0 0 -1 0 0 }
+> rftoe = \script { "ftoe" 0 0 1 0 0 }
+>
+> and also
+>
+> portato= \script { "portato" 0 -1 0 1 0 }
+
+ * MIDI spelling.
+
+ * foo = 1
+
+ \score{
+ \notes { a }
+ \paper{ foo = \translator{ \StaffContext}; }
+ }
+
+ * Align_element::padding ?
* uniformise property names.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=0
-PATCH_LEVEL=13
+PATCH_LEVEL=14
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
exit 2
fi
-font=$1
+font=`basename $1 .mf`
mf=$font.mf
afm=out/$font.afm
PKTOPBM=pktopbm
--- /dev/null
+#!@PYTHON@
+
+# ps-to-pfa.py -- make PostScript Type 3 font from separate ps char files
+#
+# source file of the GNU LilyPond music typesetter
+#
+# (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+
+name = 'ps-to-pfa'
+version = '0.2'
+
+outdir = 'out/'
+datadir = ''
+
+import os
+import sys
+
+import getopt
+from string import *
+import regex
+import regsub
+import time
+
+def program_id ():
+ return name + ' version ' + version;
+
+def identify ():
+ sys.stdout.write (program_id () + '\n')
+
+def help ():
+ sys.stdout.write ("Usage: %s [options] [files]\n"
+ "ps-to-pfa.py -- make PostScript Type 3 font from separate ps char files\n\n"
+ + "Options:\n"
+ + " -d, --datadir=DIR use DIR for ps header/footer\n"
+ + " -h, --help print this help\n"
+ % (program_name)
+ )
+ sys.exit (0)
+
+identify ()
+(options, files) = getopt.getopt (
+ sys.argv[1:], 'd:', ['help', 'package'])
+for opt in options:
+ o = opt[0]
+ a = opt[1]
+ if o== '--help' or o == '-h':
+ help ()
+ elif o == '-d' or o == '--datadir':
+ datadir = a
+ else:
+ print o
+ raise getopt.error
+
+
+def gulp_file (f):
+ sys.stderr.write ('[%s' % f)
+ try:
+ i = open (f)
+ i.seek (0, 2)
+ n = i.tell ()
+ i.seek (0,0)
+ except:
+ sys.stderr.write ('can\'t open file %s\n ' % f)
+ return ''
+ s = i.read (n)
+ sys.stderr.write (']')
+ if len (s) <= 0:
+ sys.stderr.write ('gulped empty file: %s\n'% f)
+ return s
+
+mf = files[0]
+# urg ?
+font = os.path.basename (os.path.splitext (mf)[0])
+sys.stderr.write ('Font: %s\n'% font)
+
+def header (f):
+ f.write ('%!PS-AdobeFont-3.0: ' + font + '\n')
+ f.write ('%%%%Creator: %s-%s\n' % (name, version))
+ f.write ('\n')
+ f.write ('/setgray { 1 add } bind def\n'
+ '\n'
+'8 dict begin\n'
+'/FontType 3 def %% Required elements of font\n'
+'/FontName /%s def\n'
+'/FontMatrix [.001 0 0 .001 0 0] def\n'
+'%%/FontMatrix [.01 0 0 .01 0 0] def\n'
+'%%/FontMatrix [0.1 0 0 0.1 0 0] def\n'
+'%% /FontBBox [-1000 -1000 1000 1000] def\n'
+' /FontBBox [-3000 -3000 3000 3000] def\n'
+'%% /FontBBox [-300 -300 300 300] def\n'
+'%%/FontBBox [-30 -30 30 30] def\n'
+'\n'
+'/Encoding 256 array def %% Trivial encoding vector\n'
+'0 1 255 {Encoding exch /.notdef put} for\n' % (font))
+
+def footer (f):
+ f.write ('\n'
+'/BuildGlyph { % Stack contains: font charname\n'
+'% 1000 0 % Width\n'
+'% -750 -750 750 750 % Bounding Box\n'
+' 3000 0 % Width\n'
+' -3000 -3000 3000 3000 % Bounding Box\n'
+'% 300 0 % Width\n'
+'% -300 -300 300 300 % Bounding Box\n'
+'% 30 0 % Width\n'
+'% -30 -30 30 30 % Bounding Box\n'
+' setcachedevice\n'
+' exch /CharProcs get exch % Get CharProcs dictionary\n'
+' 2 copy known not {pop /.notdef} if % See if charname is known\n'
+' get exec % Execute character procedure\n'
+'} bind def\n'
+'\n'
+'/BuildChar { % Level 1 compatibility\n'
+' 1 index /Encoding get exch get\n'
+' 1 index /BuildGlyph get exec\n'
+'} bind def\n'
+'\n'
+'currentdict\n'
+'end % of font dictionary\n')
+ f.write ('\n')
+ f.write ('/%s\n' % font)
+ f.write (''
+'exch definefont pop % Define the font\n')
+
+def characters (f):
+ #urg
+ # chars = os.listdir ()
+ # chars.sort ()
+ sys.stderr.write ('[')
+ pipe = os.popen ('/bin/ls -1 ' + font + '.[0-9] ' + font + '.[0-9][0-9] ' + font + '.[0-9][0-9][0-9] 2> /dev/null')
+ chars = []
+ i = pipe.readline ()
+ while i:
+ chars.append (i[0:len (i)-1])
+ i = pipe.readline ()
+ f.write ('\n'
+'/CharProcs 3 dict def % Subsidiary dictiorary for\n'
+'CharProcs begin % individual character definitions\n')
+ charprocs = ' /.notdef {} def\n'
+ encoding = ''
+ for i in chars:
+ s = gulp_file (i)
+ s = regsub.gsub ('^%.*\n', '', s)
+ s = regsub.gsub ('^showpage\n', '', s)
+ s = regsub.gsub ('^', ' ', s)
+ n = atoi (regsub.gsub ('.*\.', '', i))
+ s = '\n /%s-%d{\n%s} bind def\n' % (font, n, s)
+ encoding = encoding + 'Encoding %d /%s-%d put\n' % (n, font, n)
+ charprocs = charprocs + s
+ f.write (charprocs)
+ f.write ('\n')
+ f.write ('end % of CharProcs\n')
+ f.write (encoding)
+ f.write ('\n')
+ sys.stderr.write (']')
+
+ps = outdir + font + '.pfa'
+ps_file = open (ps, 'w')
+header (ps_file)
+characters (ps_file)
+footer (ps_file)
+sys.stderr.write ('\n')
+ps_file.close ()
+sys.stderr.write ('Wrote PostScript font: %s\n'% ps)
+
_Interval__compare (const Interval_t<T>&a,Interval_t<T> const&b)
{
if (a.left == b.left && a.right == b.right)
- return 0;
+ return 0;
if (a.left <= b.left && a.right >= b.right)
- return 1;
+ return 1;
if (a.left >= b.left && a.right <= b.right)
- return -1;
+ return -1;
return -2;
}
{
int c_i= _Interval__compare (*this, a);
if (c_i == -2)
- return false;
+ return false;
return c_i >= 0;
}
{
int i = _Interval__compare (a,b);
if (i < -1)
- assert (false);
+ assert (false);
return i;
}
Interval_t<T>::unite (Interval_t<T> h)
{
if (h.left<left)
- left = h.left;
+ left = h.left;
if (h.right>right)
- right = h.right;
+ right = h.right;
}
/**
Interval_t<T>::str() const
{
if (empty_b())
- return "[empty]";
+ return "[empty]";
String s ("[");
return s + T_to_str (left) + String ("," ) + T_to_str (right ) + String ("]" );
#define INTERVAL__INSTANTIATE(T) struct Interval_t<T>;\
- template int Interval__compare(const Interval_t<T>&,Interval_t<T> const&)
+template int Interval__compare(const Interval_t<T>&,Interval_t<T> const&)
#endif // INTERVAL_TCC
#include "real.hh"
#include "interval.tcc"
-template INTERVAL__INSTANTIATE (Real);
-
Real
Interval_t<Real>::infinity ()
{
return to_str (r);
}
-template INTERVAL__INSTANTIATE (int);
int
Interval_t<int>::infinity ()
return to_str (i);
}
+template INTERVAL__INSTANTIATE (int);
+template INTERVAL__INSTANTIATE (Real);
+
arithmetic_basicspace = 2.;
arithmetic_multiplier = 4.8\pt;
texsetting = "\\input lilyponddefs \\musixsixteendefs ";
-
+ pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n";
+
0 = \symboltables { \table_sixteen }
-1 = \symboltables { \table_thirteen }
-2 = \symboltables { \table_eleven }
arithmetic_basicspace = 2.;
arithmetic_multiplier = 6.\pt;
texsetting = "\\input lilyponddefs \\musixtwentydefs ";
-
+ pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n";
-2 = \symboltables { \table_thirteen }
-1 = \symboltables { \table_sixteen }
\font "feta11.afm"
- % index TeXstring, xmin xmax ymin ymax
+ % index symbol #parameters xmin xmax ymin ymax
"style" = \table {
- "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt
- "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt
- "finger" "\\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 5.0\pt
- "italic" "\\setitalic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt
- "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt
- "number" "\\setnumber{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt
- "roman" "\\settext{%}" 0.0\pt 7.5\pt 0.0\pt 10.0\pt
+ "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt
+ "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt
+ "finger" "setfinger" 1 0.0\pt 0.0\pt 0.0\pt 5.0\pt
+ "italic" "setitalic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt
+ "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt
+ "number" "setnumber" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt
+ "roman" "settext" 1 0.0\pt 7.5\pt 0.0\pt 10.0\pt
}
"dynamics" = \table {
- "mf" "\\dynmf"
- "fff" "\\dynfff"
- "ff" "\\dynff"
- "f" "\\dynf"
+ "mf" "dynmf" 0
+ "fff" "dynfff" 0
+ "ff" "dynff" 0
+ "f" "dynf" 0
- "mp" "\\dynmp"
- "p" "\\dynp"
- "pp" "\\dynpp"
- "ppp" "\\dynppp"
- "fp" "\\dynfp"
- "sf" "\\dynsf"
- "sfz" "\\dynsfz"
+ "mp" "dynmp" 0
+ "p" "dynp" 0
+ "pp" "dynpp" 0
+ "ppp" "dynppp" 0
+ "fp" "dynfp" 0
+ "sf" "dynsf" 0
+ "sfz" "dynsfz" 0
}
"align" = \table {
- "-1" "\\leftalign{%}"
- "0" "\\centeralign{%}"
- "1" "\\rightalign{%}"
+ "-1" "leftalign" 1
+ "0" "centeralign" 1
+ "1" "rightalign" 1
}
"bars" = \table {
- "empty" "\\emptybar"
- "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt
- "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt
- "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt
- "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt
- ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt
- ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt
- "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt
+ "empty" "emptybar" 0
+ "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt
+ "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt
+ "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt
+ ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt
+ ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt
+ "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt
}
"foobar" = \table {
- "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
}
% dims ignored for this table
"param" = \table {
- "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 96.0\pt
- "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "stem" "\\stem{%}{%}"
- "fill" "\\hbox{}"
- "rule" "\\rulesym{%}{%}"
+ "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 96.0\pt
+ "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "stem" "stem" 2
+ "fill" "hbox{}" 0
+ "rule" "rulesym" 2
}
}
\font "feta13.afm"
- % index TeXstring, xmin xmax ymin ymax
+ % index symbol #parameters xmin xmax ymin ymax
"style" = \table {
- "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt
- "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt
- "finger" "\\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 5.0\pt
- "italic" "\\setitalic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt
- "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt
- "number" "\\setnumber{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt
- "roman" "\\settext{%}" 0.0\pt 7.5\pt 0.0\pt 10.0\pt
+ "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt
+ "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt
+ "finger" "setfinger" 1 0.0\pt 0.0\pt 0.0\pt 5.0\pt
+ "italic" "setitalic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt
+ "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt
+ "number" "setnumber" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt
+ "roman" "settext" 1 0.0\pt 7.5\pt 0.0\pt 10.0\pt
}
"dynamics" = \table {
- "mf" "\\dynmf"
- "fff" "\\dynfff"
- "ff" "\\dynff"
- "f" "\\dynf"
+ "mf" "dynmf" 0
+ "fff" "dynfff" 0
+ "ff" "dynff" 0
+ "f" "dynf" 0
- "mp" "\\dynmp"
- "p" "\\dynp"
- "pp" "\\dynpp"
- "ppp" "\\dynppp"
- "fp" "\\dynfp"
- "sf" "\\dynsf"
- "sfz" "\\dynsfz"
+ "mp" "dynmp" 0
+ "p" "dynp" 0
+ "pp" "dynpp" 0
+ "ppp" "dynppp" 0
+ "fp" "dynfp" 0
+ "sf" "dynsf" 0
+ "sfz" "dynsfz" 0
}
"align" = \table {
- "-1" "\\leftalign{%}"
- "0" "\\centeralign{%}"
- "1" "\\rightalign{%}"
+ "-1" "leftalign" 1
+ "0" "centeralign" 1
+ "1" "rightalign" 1
}
"bars" = \table {
- "empty" "\\emptybar"
- "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt
- "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt
- "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt
- "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt
- ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt
- ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt
- "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt
+ "empty" "emptybar" 0
+ "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt
+ "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt
+ "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt
+ ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt
+ ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt
+ "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt
}
"time_signatures" = \table {
- "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
}
% dims ignored for this table
"param" = \table {
- "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 96.0\pt
- "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "stem" "\\stem{%}{%}"
- "fill" "\\hbox{}"
- "rule" "\\rulesym{%}{%}"
+ "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 96.0\pt
+ "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "stem" "stem" 2
+ "fill" "hbox{}" 0
+ "rule" "rulesym" 2
}
}
\symboltables {
\font "feta16.afm"
- % index TeXstring, xmin xmax ymin ymax
+ % index symbol #parameters xmin xmax ymin ymax
"style" = \table {
- "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt
- "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 8.0\pt
- "finger" "\\setfinger{%}" 0.0\pt 2.0\pt 0.0\pt 4.0\pt
- "italic" "\\setitalic{%}" 0.0\pt 4.\pt 0.0\pt 8.0\pt
- "typewriter" "\\settypewriter{%}" 0.0\pt 4.\pt 0.0\pt 8.0\pt
- "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 10.0\pt
- "number" "\\setnumber{%}" 0.0\pt 6.0\pt 0.0\pt 8.0\pt
- "roman" "\\settext{%}" 0.0\pt 4.5\pt 0.0\pt 8.0\pt
+ "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt
+ "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 8.0\pt
+ "finger" "setfinger" 1 0.0\pt 2.0\pt 0.0\pt 4.0\pt
+ "italic" "setitalic" 1 0.0\pt 4.\pt 0.0\pt 8.0\pt
+ "typewriter" "settypewriter" 1 0.0\pt 4.\pt 0.0\pt 8.0\pt
+ "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 10.0\pt
+ "number" "setnumber" 1 0.0\pt 6.0\pt 0.0\pt 8.0\pt
+ "roman" "settext" 1 0.0\pt 4.5\pt 0.0\pt 8.0\pt
}
"dynamics" = \table {
- "mf" "\\dynmf"
- "fff" "\\dynfff"
- "ff" "\\dynff"
- "f" "\\dynf"
- "mp" "\\dynmp"
- "p" "\\dynp"
- "pp" "\\dynpp"
- "ppp" "\\dynppp"
- "fp" "\\dynfp"
- "sf" "\\dynsf"
- "sfz" "\\dynsfz"
+ "mf" "dynmf" 0
+ "fff" "dynfff" 0
+ "ff" "dynff" 0
+ "f" "dynf" 0
+ "mp" "dynmp" 0
+ "p" "dynp" 0
+ "pp" "dynpp" 0
+ "ppp" "dynppp" 0
+ "fp" "dynfp" 0
+ "sf" "dynsf" 0
+ "sfz" "dynsfz" 0
}
"align" = \table {
- "-1" "\\leftalign{%}"
- "0" "\\centeralign{%}"
- "1" "\\rightalign{%}"
+ "-1" "leftalign" 1
+ "0" "centeralign" 1
+ "1" "rightalign" 1
}
"bars" = \table {
- "empty" "\\emptybar"
- "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt
- "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 16.0\pt
- "||" "\\doublebar{%}" 0.0\pt 4.0\pt 0.0\pt 16.0\pt
- "|." "\\finishbar{%}" -4.0\pt 0.0\pt 0.0\pt 16.0\pt
- ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 16.0\pt
- ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|" "\\repeatbar" -8.0\pt 0.0\pt 0.0\pt 16.0\pt
- "|:" "\\startrepeat" 0.0\pt 8.0\pt 0.0\pt 16.0\pt
- ":|:" "\\repeatbarstartrepeat" 0.0\pt 16.0\pt 0.0\pt 16.0\pt
+ "empty" "emptybar" 0
+ "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 16.0\pt
+ "||" "doublebar" 1 0.0\pt 4.0\pt 0.0\pt 16.0\pt
+ "|." "finishbar" 1 -4.0\pt 0.0\pt 0.0\pt 16.0\pt
+ ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 16.0\pt
+ ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|" "repeatbar" 0 -8.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "|:" "startrepeat" 0 0.0\pt 8.0\pt 0.0\pt 16.0\pt
+ ":|:" "repeatbarstartrepeat" 0 0.0\pt 16.0\pt 0.0\pt 16.0\pt
}
"meters" = \table {
- "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
}
% dims ignored for this table
"param" = \table {
- "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 80.0\pt
- "bracket" "\\staffbracket{%}" 0.0\pt 4.0\pt 16.0\pt 128.0\pt
- "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -8.0\pt 8.0\pt
- "rule" "\\rulesym{%}{%}"
- "stem" "\\stem{%}{%}"
- "fill" "\\hbox{}"
+ "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 80.0\pt
+ "bracket" "staffbracket" 1 0.0\pt 4.0\pt 16.0\pt 128.0\pt
+ "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -8.0\pt 8.0\pt
+ "rule" "rulesym" 2
+ "stem" "stem" 2
+ "fill" "hbox{}" 0
}
"beamslopes" = \table {
- "slope" "\\beamslope{%}{%}" 2.0\pt 64.0\pt 0.0\pt 0.0\pt
- "horizontal" "\\rulesym{%}{%}"
+ "slope" "beamslope" 2 2.0\pt 64.0\pt 0.0\pt 0.0\pt
+ "horizontal" "rulesym" 2
}
}
\font "feta20.afm"
- % index TeXstring, xmin xmax ymin ymax
+ % index symbol #parameters xmin xmax ymin ymax
"style" = \table {
- "bold" "\\setbold{%}" 0.0\pt 5.50\pt 0.0\pt 8.0\pt
- "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt
- "finger" "\\setfinger{%}" 0.0\pt 4.5\pt 0.0\pt 5.0\pt
- "typewriter" "\\settypewriter{%}" 0.0\pt 5.5\pt 0.0\pt 10.0\pt
- "italic" "\\setitalic{%}" 0.0\pt 5.5\pt 0.0\pt 10.0\pt
- "large" "\\setlarge{%}" 0.0\pt 6.50\pt 0.0\pt 12.0\pt
- "Large" "\\setLarge{%}" 0.0\pt 6.50\pt 0.0\pt 12.0\pt
- "mark" "\\setmark{%}" 0.0\pt 6.50\pt 0.0\pt 12.0\pt
- "number" "\\setnumber{%}" 0.0\pt 8.0\pt 0.0\pt 10.0\pt
- "roman" "\\settext{%}" 0.0\pt 5.6\pt 0.0\pt 10.0\pt
+ "bold" "setbold" 1 0.0\pt 5.50\pt 0.0\pt 8.0\pt
+ "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt
+ "finger" "setfinger" 1 0.0\pt 4.5\pt 0.0\pt 5.0\pt
+ "typewriter" "settypewriter" 1 0.0\pt 5.5\pt 0.0\pt 10.0\pt
+ "italic" "setitalic" 1 0.0\pt 5.5\pt 0.0\pt 10.0\pt
+ "large" "setlarge" 1 0.0\pt 6.50\pt 0.0\pt 12.0\pt
+ "Large" "setLarge" 1 0.0\pt 6.50\pt 0.0\pt 12.0\pt
+ "mark" "setmark" 1 0.0\pt 6.50\pt 0.0\pt 12.0\pt
+ "number" "setnumber" 1 0.0\pt 8.0\pt 0.0\pt 10.0\pt
+ "roman" "settext" 1 0.0\pt 5.6\pt 0.0\pt 10.0\pt
}
"dynamics" = \table {
- "mf" "\\dynmf"
- "fff" "\\dynfff"
- "ff" "\\dynff"
- "f" "\\dynf"
- "mp" "\\dynmp"
- "p" "\\dynp"
- "pp" "\\dynpp"
- "ppp" "\\dynppp"
- "fp" "\\dynfp"
- "sf" "\\dynsf"
- "sfz" "\\dynsfz"
+ "mf" "dynmf" 0
+ "fff" "dynfff" 0
+ "ff" "dynff" 0
+ "f" "dynf" 0
+ "mp" "dynmp" 0
+ "p" "dynp" 0
+ "pp" "dynpp" 0
+ "ppp" "dynppp" 0
+ "fp" "dynfp" 0
+ "sf" "dynsf" 0
+ "sfz" "dynsfz" 0
}
"align" = \table {
- "-1" "\\leftalign{%}"
- "0" "\\centeralign{%}"
- "1" "\\rightalign{%}"
+ "-1" "leftalign" 1
+ "0" "centeralign" 1
+ "1" "rightalign" 1
}
"bars" = \table {
- "empty" "\\emptybar"
- "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt
- "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt
- "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt
- "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt
- ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt
- ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt
- "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt
+ "empty" "emptybar" 0
+ "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt
+ "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt
+ "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt
+ ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt
+ ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt
+ "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt
}
"meters" = \table {
- "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
}
% dims ignored for this table
"param" = \table {
- "bracket" "\\staffbracket{%}" 0.0\pt 0.0\pt 20.0\pt 160.0\pt
- "rule" "\\rulesym{%}{%}"
- "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 40.0\pt 100.0\pt
- "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "stem" "\\stem{%}{%}"
- "fill" "\\hbox{}"
+ "bracket" "staffbracket" 1 0.0\pt 0.0\pt 20.0\pt 160.0\pt
+ "rule" "rulesym" 2
+ "brace" "pianobrace" 1 0.0\pt 0.0\pt 40.0\pt 100.0\pt
+ "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "stem" "stem" 2
+ "fill" "hbox{}" 0
}
"beamslopes" = \table {
- "slope" "\\beamslope{%}{%}" 2.0\pt 64.0\pt 0.0\pt 0.0\pt
- "horizontal" "\\rulesym{%}{%}"
+ "slope" "beamslope" 2 2.0\pt 64.0\pt 0.0\pt 0.0\pt
+ "horizontal" "rulesym" 2
}
}
\font "feta26.afm"
- % index TeXstring, xmin xmax ymin ymax
+ % index symbol #parameters xmin xmax ymin ymax
"style" = \table {
- "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt
- "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt
- "finger" "\\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 5.0\pt
- "italic" "\\setitalic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt
- "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt
- "number" "\\setnumber{%}" 0.0\pt 8.0\pt 0.0\pt 10.0\pt
- "roman" "\\settext{%}" 0.0\pt 7.5\pt 0.0\pt 10.0\pt
+ "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt
+ "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt
+ "finger" "setfinger" 1 0.0\pt 0.0\pt 0.0\pt 5.0\pt
+ "italic" "setitalic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt
+ "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt
+ "number" "setnumber" 1 0.0\pt 8.0\pt 0.0\pt 10.0\pt
+ "roman" "settext" 1 0.0\pt 7.5\pt 0.0\pt 10.0\pt
}
"dynamics" = \table {
- "mf" "\\dynmf"
- "fff" "\\dynfff"
- "ff" "\\dynff"
- "f" "\\dynf"
+ "mf" "dynmf" 0
+ "fff" "dynfff" 0
+ "ff" "dynff" 0
+ "f" "dynf" 0
- "mp" "\\dynmp"
- "p" "\\dynp"
- "pp" "\\dynpp"
- "ppp" "\\dynppp"
- "fp" "\\dynfp"
- "sf" "\\dynsf"
- "sfz" "\\dynsfz"
+ "mp" "dynmp" 0
+ "p" "dynp" 0
+ "pp" "dynpp" 0
+ "ppp" "dynppp" 0
+ "fp" "dynfp" 0
+ "sf" "dynsf" 0
+ "sfz" "dynsfz" 0
}
"align" = \table {
- "-1" "\\leftalign{%}"
- "0" "\\centeralign{%}"
- "1" "\\rightalign{%}"
+ "-1" "leftalign" 1
+ "0" "centeralign" 1
+ "1" "rightalign" 1
}
"bars" = \table {
- "empty" "\\emptybar"
- "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt
- "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt
- "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt
- "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt
- ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt
- ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt
- "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt
- ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt
+ "empty" "emptybar" 0
+ "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt
+ "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt
+ "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt
+ ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt
+ ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt
+ "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt
+ ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt
}
"meters" = \table {
- "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
}
% dims ignored for this table
"param" = \table {
- "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 96.0\pt
- "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "stem" "\\stem{%}{%}"
- "fill" "\\hbox{}"
- "rule" "\\rulesym{%}{%}"
+ "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 96.0\pt
+ "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt
+ "stem" "stem" 2
+ "fill" "hbox{}" 0
+ "rule" "rulesym" 2
}
}
#include "paper-def.hh"
#include "lookup.hh"
#include "stem.hh"
-#include "dimension.hh"
Abbreviation::Abbreviation ()
{
#include "p-col.hh"
#include "array.hh"
#include "proto.hh"
-#include "dimension.hh"
#include "abbreviation-beam.hh"
#include "misc.hh"
#include "debug.hh"
Adobe_font_char_metric::Adobe_font_char_metric ()
{
- C_ = 0;
+ C_ = -1;
}
Adobe_font_metric::Adobe_font_metric ()
#include "atom.hh"
-#include "tex.hh"
#include "interval.hh"
-#include "dimension.hh"
#include "string.hh"
#include "array.hh"
#include "debug.hh"
+#include "dimensions.hh"
+#include "lookup.hh"
#include "main.hh"
inline bool
if (abs (off_[ax]) >= 100 CM)
{
warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax),
- print_dimen (off_[ax])));
+ global_lookup_l->print_dimen (off_[ax])));
if (experimental_features_global_b)
assert (false);
But Atom is used as a simple type *everywhere*,
and we don't have virtual contructors.
*/
- str_ = ps_output_global_b ? "unknown" : "\\unknown";
+ str_ = global_lookup_l->unknown_str ();
}
Atom::Atom (String s, Box b)
#include "span-bar.hh"
#include "stem.hh"
#include "time-description.hh"
-#include "dimension.hh"
Bar_number_engraver::Bar_number_engraver()
{
#include "p-col.hh"
#include "array.hh"
#include "proto.hh"
-#include "dimension.hh"
+#include "dimensions.hh"
#include "beam.hh"
#include "abbreviation-beam.hh"
#include "misc.hh"
#include "misc.hh"
#ifndef STANDALONE
+#include "dimensions.hh"
#include "direction.hh"
-#include "dimension.hh"
#include "paper-def.hh"
#include "debug.hh"
#include "main.hh"
*/
#include "break-align-item.hh"
-#include "dimension.hh"
+#include "dimensions.hh"
void
Break_align_item::do_pre_processing()
*/
#include "molecule.hh"
-#include "dimension.hh"
#include "crescendo.hh"
#include "lookup.hh"
+#include "dimensions.hh"
#include "paper-def.hh"
#include "debug.hh"
#include "score-column.hh"
s+= "\\def\\LilyIdString{" + lily_id_str_ + "}";
for (Dictionary_iter<String> i (*this); i.ok (); i++)
- s += "\\def\\mudela" + i.key () + "{" + i.val () + "}";
+ s += "\\def\\mudela" + i.key () + "{" + i.val () + "}\n";
return s;
}
s+= "/lily_id_string\n{" + lily_id_str_ + "} bind def\n";
for (Dictionary_iter<String> i (*this); i.ok (); i++)
- s += "/mudela" + i.key () + "{" + i.val () + "} bind def";
+ s += "/mudela" + i.key () + "{" + i.val () + "} bind def\n";
return s;
}
--- /dev/null
+#ifndef DIMENSIONS_HH
+#define DIMENSIONS_HH
+
+#include "real.hh"
+#include "string.hh"
+
+const Real INCH_TO_PT=72.270;
+const Real CM_TO_PT=INCH_TO_PT/2.54;
+const Real MM_TO_PT=CM_TO_PT/10;
+const Real PT_TO_PT =1.0;
+
+#define PT *PT_TO_PT
+#define MM *MM_TO_PT
+#define CM *CM_TO_PT
+#define INCH *INCH_TO_PT
+
+#endif // DIMENSIONS_HH
+
#include "curve.hh"
#include "afm.hh"
#include "symtable.hh"
+#include "box.hh"
/** handy interface to symbol table
*/
void add (String, Symtable*);
virtual Atom afm_find (String s) const = 0;
Atom afm_find (String, String) const;
+ virtual Atom* atom_p (String, int, Box) const = 0;
Atom ball (int) const;
Atom bar (String, Real height) const;
+ String base_output_str () const;
Atom beam (Real,Real, Real) const;
+ virtual String character_str (int i) const;
Atom clef (String) const;
virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const = 0;
Atom dots () const;
Atom fill (Box b) const;
Atom flag (int, Direction) const;
virtual Atom hairpin (Real width, bool decresc, bool continued) const = 0;
+ virtual Lookup* lookup_p (Lookup const&) const = 0;
+ virtual Lookup* lookup_p (Symtables const&) const = 0;
+ virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const = 0;
+ virtual Paper_stream* paper_stream_p () const = 0;
virtual Atom plet (Real dy, Real dx, Direction dir) const = 0;
void print () const;
virtual Atom ps_beam (Real slope, Real width, Real thick) const = 0;
+ virtual String print_dimen (Real) const;
Atom rest (int, bool outside) const;
Atom rule_symbol (Real height, Real width) const;
Atom script (String idx) const;
+ /** paratime_signature substitution in lookup strings.
+ this function provides a simple macro mechanism:
+
+ if source == "tex%bla%", then
+ substitute_args (source, {"X","Y"}) == "texXblaY"
+ */
+ String substitute_args (String source, Array<String> args) const;
+ /// paratime_signature substitution in lookup strings
+ String substitute_args (String source, Array<Scalar> args) const;
virtual Atom stem (Real y1_pos, Real y2_pos) const = 0;
Atom stem (Real y1_pos, Real y2_pos, String) const;
virtual Atom slur (Array<Offset> controls) const = 0;
Atom streepje (int type) const;
- Atom text (String style, String text) const;
+ virtual Atom text (String style, String text) const;
+ virtual String unknown_str () const = 0;
Atom vbrace (Real &dy) const;
virtual Atom vbracket (Real &dy) const = 0;
Atom special_time_signature (String, Array<Scalar>) const;
extern bool find_quarts_global_b;
extern int exit_status_i_;
extern bool experimental_features_global_b;
-extern bool ps_output_global_b;
+extern Lookup* global_lookup_l;
extern bool dependency_global_b;
extern bool version_ignore_global_b;
*/
-class Paper_score : public Music_output {
- Paper_outputter *open_paper_outputter (Paper_stream*);
- Paper_outputter *open_ps_outputter (Ps_stream*);
- Paper_outputter *open_tex_outputter (Tex_stream*);
- Paper_stream *open_output_stream ();
-
+class Paper_score : public Music_output
+{
public:
Paper_def *paper_l_;
virtual ~Ps_lookup ();
virtual Atom afm_find (String s) const;
- virtual Atom Ps_lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
- virtual Atom Ps_lookup::hairpin (Real width, bool decresc, bool continued) const;
- virtual Atom Ps_lookup::plet (Real dy , Real dx, Direction dir) const;
- virtual Atom Ps_lookup::ps_beam (Real slope, Real width, Real thick) const;
- virtual Atom Ps_lookup::slur (Array<Offset> controls) const;
+ virtual Atom* atom_p (String, int, Box) const;
+ virtual String character_str (int i) const;
+ virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
+ virtual Atom hairpin (Real width, bool decresc, bool continued) const;
+ virtual Lookup* lookup_p (Lookup const&) const;
+ virtual Lookup* lookup_p (Symtables const&) const;
+ virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const;
+ virtual Paper_stream* paper_stream_p () const;
+ virtual Atom plet (Real dy , Real dx, Direction dir) const;
+ virtual Atom ps_beam (Real slope, Real width, Real thick) const;
+ virtual Atom slur (Array<Offset> controls) const;
virtual Atom stem (Real y1, Real y2) const;
- virtual Atom Ps_lookup::vbracket (Real &y) const;
+ virtual Atom text (String style, String text) const;
+ virtual String unknown_str () const;
+ virtual Atom vbracket (Real &y) const;
};
#endif // PS_LOOKUP_HH
virtual ~Tex_lookup();
virtual Atom afm_find (String s) const;
+ virtual String character_str (int i) const;
virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
+ virtual Atom* atom_p (String, int, Box) const;
Atom embed (Atom a) const;
virtual Atom hairpin (Real width, bool decresc, bool continued) const;
+ virtual Lookup* lookup_p (Lookup const&) const;
+ virtual Lookup* lookup_p (Symtables const&) const;
+ virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const;
+ virtual Paper_stream* paper_stream_p () const;
virtual Atom plet (Real dy , Real dx, Direction dir) const;
+ virtual String print_dimen (Real) const;
virtual Atom ps_beam (Real slope, Real width, Real thick) const;
virtual Atom slur (Array<Offset> controls) const;
virtual Atom stem (Real y1, Real y2) const;
+ virtual Atom text (String style, String text) const;
+ virtual String unknown_str () const;
virtual Atom vbracket (Real &y) const;
};
*/
#include "line-of-score.hh"
-#include "dimension.hh"
#include "spanner.hh"
#include "atom.hh"
#include "paper-def.hh"
(c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "dimension.hh"
#include "local-key-item.hh"
#include "molecule.hh"
#include "scalar.hh"
#include "lookup.hh"
#include "debug.hh"
+#include "dimensions.hh"
#include "symtable.hh"
-#include "dimension.hh"
-#include "tex.hh"
#include "scalar.hh"
#include "paper-def.hh"
#include "string-convert.hh"
Adobe_font_char_metric m = afm_p_->find_char (s);
Atom a;
- if (m.width () ==0)
+ if (m.code () < 0)
return a;
a.dim_ = m.B_;
return s;
}
+String
+Lookup::base_output_str () const
+{
+ assert (paper_l_);
+ String str = paper_l_->get_default_output ();
+
+ if (str.empty_b ())
+ {
+ str = default_outname_base_global;
+ int def = paper_l_->get_next_default_count ();
+ if (def)
+ str += "-" + to_str (def);
+ }
+ return str;
+}
+
Atom
Lookup::beam (Real slope, Real width, Real thick) const
{
return a;
}
+String
+Lookup::character_str (int i) const
+{
+ return to_str (i);
+}
+
Atom
Lookup::clef (String st) const
{
#endif
}
+String
+Lookup::print_dimen (Real r) const
+{
+ String s = to_str (r, "%.3f");
+ if (s.index_i ("NaN") != -1)
+ {
+ warning (_ ("NaN"));
+ s = "0.0";
+ }
+ return s;
+}
+
Atom
Lookup::rest (int j, bool o) const
{
Array<String> args;
args.push (print_dimen (height));
args.push (print_dimen (width));
- bs.str_ = substitute_args (bs.str_,args);
- bs.dim_.x () = Interval (0,width);
- bs.dim_.y () = Interval (0,height);
+ bs.str_ = substitute_args (bs.str_, args);
+ bs.dim_.x () = Interval (0, width);
+ bs.dim_.y () = Interval (0, height);
return bs;
}
Atom
Lookup::special_time_signature (String s, Array<Scalar> arr) const
{
- String symbolname="timesig-"+s+"%/%";
- Atom a (afm_find (substitute_args(symbolname,arr)));
- if (!a.empty())
+ String symbolname = "timesig-"+s+"%/%";
+ Atom a (afm_find (substitute_args (symbolname, arr)));
+ if (!a.empty ())
return a;
// Try if the full name was given
- a=afm_find ("timesig-"+s);
- if (!a.empty())
+ a = afm_find ("timesig-"+s);
+ if (!a.empty ())
return a;
// Resort to default layout with numbers
- return time_signature(arr);
+ return time_signature (arr);
+}
+
+static void
+substitute_arg (String& r, String arg)
+{
+ int p = r.index_i ('%');
+ if (p < 0)
+ return ;
+
+ r = r.left_str (p) + arg + r.right_str (r.length_i () - p - 1);
+}
+
+String
+Lookup::substitute_args (String source, Array<String> args) const
+{
+ String str (source);
+ for (int i = 0 ; i < args.size (); i++)
+ substitute_arg (str, args[i]);
+ return str;
+}
+
+String
+Lookup::substitute_args (String source, Array<Scalar> args) const
+{
+ Array<String> sv;
+ for (int i = 0 ; i < args.size (); i++)
+ sv.push (args[i]);
+ return substitute_args (source, sv);
}
Atom
{
Array<String> a;
- a.push (to_str (idx));
+ a.push (character_str (idx));
brace.str_ = substitute_args (brace.str_,a);
brace.dim_[Y_AXIS] = Interval (-y/2,y/2);
}
#include <assert.h>
#include <locale.h>
#include "proto.hh"
+#include "dimensions.hh"
#include "plist.hh"
#include "getopt-long.hh"
#include "misc.hh"
#include "config.hh"
#include "file-results.hh"
#include "debug.hh"
+#include "ps-lookup.hh"
+#include "tex-lookup.hh"
#if HAVE_GETTEXT
#include <libintl.h>
bool no_paper_global_b = false;
bool no_timestamps_global_b = false;
bool find_quarts_global_b = false;
-bool ps_output_global_b = false;
String default_outname_base_global = "lelie";
int default_count_global;
File_path global_path;
+Ps_lookup ps_lookup;
+Tex_lookup tex_lookup;
+Lookup* global_lookup_l = &tex_lookup;
bool experimental_features_global_b = false;
bool dependency_global_b = false;
{
case 't':
experimental_features_global_b = true;
- ps_output_global_b = true;
+ global_lookup_l = &ps_lookup;
break;
case 'o':
outname_str = oparser.optional_argument_ch_C_;
*/
#include "interval.hh"
-#include "dimension.hh"
#include "string.hh"
#include "molecule.hh"
#include "atom.hh"
#include "debug.hh"
-#include "tex.hh"
Box
Molecule::extent() const
#include "debug.hh"
#include "paper-def.hh"
#include "lookup.hh"
-#include "dimension.hh"
#include "rest.hh"
#include "script.hh"
#include "text-def.hh"
#include "misc.hh"
#include "dots.hh"
#include "note-head.hh"
-#include "dimension.hh"
#include "debug.hh"
#include "paper-def.hh"
#include "lookup.hh"
line_l_->space_processing ();
Array<Column_x_positions> breaking = calc_breaking ();
- Paper_stream *paper_stream_p = open_output_stream ();
- outputter_l_ = open_paper_outputter (paper_stream_p);
+
+ Paper_stream* paper_stream_p = global_lookup_l->paper_stream_p ();
+ outputter_l_ = global_lookup_l->paper_outputter_p (paper_stream_p, paper_l_, header_l_, origin_str_);
Link_array<Line_of_score> lines;
for (int i=0; i < breaking.size (); i++)
}
- if (ps_output_global_b)
- *paper_stream_p << "\nshowpage\n";
- else
- *paper_stream_p << "\n\\EndLilyPondOutput";
-
+ // huh?
delete outputter_l_;
delete paper_stream_p;
outputter_l_ = 0;
}
-
void
Paper_score::remove_line (Line_of_score *l)
{
}
}
-Paper_stream *
-Paper_score::open_output_stream ()
-{
- // output
- String base_outname=paper_l_->get_default_output ();
-
- if (base_outname.empty_b ())
- {
- base_outname = default_outname_base_global;
- int def = paper_l_->get_next_default_count ();
- if (def)
- {
- base_outname += "-" + to_str (def);
- }
- }
-
- String outname = base_outname;
-
- Paper_stream* p;
- if (ps_output_global_b)
- {
- if (outname != "-")
- outname += ".ps";
- *mlog << _f ("PostScript output to %s...",
- outname == "-" ? String ("<stdout>") : outname ) << endl;
- p = new Ps_stream (outname);
- }
- else
- {
- if (outname != "-")
- outname += ".tex";
- *mlog << _f ("TeX output to %s...",
- outname == "-" ? String ("<stdout>") : outname ) << endl;
- p = new Tex_stream (outname);
- }
- target_str_global_array.push (outname);
- return p;
-}
-
-// urg
-Paper_outputter*
-Paper_score::open_paper_outputter (Paper_stream* paper_stream_p)
-{
- if (ps_output_global_b)
- return open_ps_outputter ((Ps_stream*)paper_stream_p);
- else
- return open_tex_outputter ((Tex_stream*)paper_stream_p);
-}
-
-// urg urg urg
-Paper_outputter*
-Paper_score::open_ps_outputter (Ps_stream *ps_out_p)
-{
- Ps_outputter *interfees_p = new Ps_outputter (ps_out_p);
-
- if (header_global_p)
- *ps_out_p << header_global_p->ps_string ();
-
- *ps_out_p << _ ("% outputting Score, defined at: ") << origin_str_ << '\n';
-
- // urg
- if (header_l_)
- *ps_out_p << header_l_->ps_string ();
- //aaarg
- *ps_out_p << paper_l_->ps_output_settings_str ();
-
- if (experimental_features_global_b)
- *ps_out_p << "turnOnExperimentalFeatures\n";
-
- return interfees_p;
-}
-
-Paper_outputter*
-Paper_score::open_tex_outputter (Tex_stream *tex_out_p)
-{
- Tex_outputter *interfees_p= new Tex_outputter (tex_out_p);
-
- if (header_global_p)
- *tex_out_p << header_global_p->tex_string ();
-
-
- *tex_out_p << _ ("% outputting Score, defined at: ") << origin_str_ << '\n';
-
- if (header_l_)
- *tex_out_p << header_l_->tex_string();
- *tex_out_p << paper_l_->tex_output_settings_str ();
-
-
- if (experimental_features_global_b)
- *tex_out_p << "\\turnOnExperimentalFeatures%\n";
-
- *tex_out_p << "\\turnOnPostScript%\n";
- return interfees_p;
-}
-
/** Get all breakable columns between l and r, (not counting l and r). */
Link_array<Paper_column>
Paper_score::breakable_col_range (Paper_column*l, Paper_column*r) const
#include "lookup.hh"
#include "ps-lookup.hh"
#include "tex-lookup.hh"
-#include "dimension.hh"
#include "assoc-iter.hh"
#include "score-engraver.hh"
#include "p-score.hh"
lookup_p_assoc_p_ = new Assoc<int, Lookup*>;
for (Assoc_iter<int, Lookup*> ai(*s.lookup_p_assoc_p_); ai.ok (); ai++)
{
- Lookup * l = ps_output_global_b ? new Ps_lookup (*ai.val ())
- : new Tex_lookup (*ai.val ());
+ Lookup * l = global_lookup_l->lookup_p (*ai.val ());
l->paper_l_ = this;
set_lookup (ai.key(), l);
}
for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)
s += String ("/mudelapaper") + i.key ()
+ "{" + i.val ()->str () + "} bind def\n";
- s += *scope_p_->elem ("texsetting")->access_String ();
+ s += *scope_p_->elem ("pssetting")->access_String ();
return s;
}
#include "molecule.hh"
#include "atom.hh"
#include "array.hh"
-#include "dimension.hh"
-// urg, silly name
-#include "tex.hh"
#include "string-convert.hh"
#include "debug.hh"
+#include "lookup.hh"
+#include "main.hh"
Paper_outputter::Paper_outputter (Paper_stream *s)
{
Array<String> a;
String r;
- a.push (print_dimen (a_off.y()));
- a.push (print_dimen (a_off.x()));
+ a.push (global_lookup_l->print_dimen (a_off.y()));
+ a.push (global_lookup_l->print_dimen (a_off.x()));
a.push (i->str_);
- r += substitute_args (s, a);
+ r += global_lookup_l->substitute_args (s, a);
*outstream_l_ << r;
}
}
#include <fstream.h>
#include <time.h>
-//#include "tex.hh"
#include "main.hh"
#include "paper-stream.hh"
#include "debug.hh"
delete os; // we want to see the remains.
assert (nest_level>=0);
}
+
+ /* don't break line if not nested; very ugly for ps */
+ if (nest_level == 0)
+ break;
+
/* FALLTHROUGH */
case '\n':
#include "ps-lookup.hh"
#include "debug.hh"
+#include "dimensions.hh"
#include "symtable.hh"
-#include "dimension.hh"
-#include "tex.hh"
#include "scalar.hh"
#include "paper-def.hh"
#include "string-convert.hh"
#include "main.hh"
+#include "file-results.hh"
+#include "header.hh"
+#include "paper-stream.hh"
+#include "ps-stream.hh"
+#include "ps-outputter.hh"
Ps_lookup::Ps_lookup ()
: Lookup ()
Atom
Ps_lookup::afm_find (String s) const
{
- return Lookup::afm_find (s, String ("(%d)"));
+ return Lookup::afm_find (s, String ("(\\%03o) show "));
+}
+
+Atom*
+Ps_lookup::atom_p (String s, int n, Box b) const
+{
+ for (int i = 0; i < n; i++)
+ s.prepend ("% ");
+ return new Atom (s, b);
+}
+
+String
+Ps_lookup::character_str (int i) const
+{
+ return to_str (i, "(\\%03o)");
}
Atom
ps += "[" + String_convert::double_str (on) + " ";
ps += String_convert::double_str (off) + "] ";
ps += String_convert::int_str (0) + " ";
- ps += " draw_dashed_slur";
+ ps += "draw_dashed_slur ";
Atom a;
a.str_ = ps;
return a;
}
+Lookup*
+Ps_lookup::lookup_p (Lookup const& l) const
+{
+ return new Ps_lookup (l);
+}
+
+Lookup*
+Ps_lookup::lookup_p (Symtables const& s) const
+{
+ return new Ps_lookup (s);
+}
+
+Paper_outputter*
+Ps_lookup::paper_outputter_p (Paper_stream* os_p, Paper_def* paper_l, Header* header_l, String origin_str) const
+{
+ if (header_global_p)
+ *os_p << header_global_p->ps_string ();
+
+ *os_p << _ ("\n% outputting Score, defined at: ") << origin_str << '\n';
+
+ if (header_l)
+ *os_p << header_l->ps_string ();
+ *os_p << paper_l->ps_output_settings_str ();
+
+ if (experimental_features_global_b)
+ *os_p << "turnOnExperimentalFeatures\n";
+
+ return new Ps_outputter (os_p);
+}
+
+Paper_stream*
+Ps_lookup::paper_stream_p () const
+{
+#if 1
+ String outname = base_output_str ();
+#else
+ String outname = "lelie";
+#endif
+
+ if (outname != "-")
+ outname += ".ps";
+ *mlog << _f ("PostScript output to %s...",
+ outname == "-" ? String ("<stdout>") : outname ) << endl;
+ target_str_global_array.push (outname);
+ return new Ps_stream (outname);
+}
+
Atom
Ps_lookup::plet (Real dy , Real dx, Direction dir) const
{
ps += String_convert::double_str (dx) + " "
+ String_convert::double_str (dy) + " "
+ String_convert::int_str ( (int)dir) +
- " draw_plet";
+ " draw_plet ";
Atom s;
s.str_ = ps;
{
String ps;
ps += to_str (width) + " "+ to_str (slope) + " " + to_str (thick)
- + " draw_beam";
+ + " draw_beam ";
Atom s;
s.str_ = ps;
ps += String_convert::double_str (controls[0].x ()) + " "
+ String_convert::double_str (controls[0].y ()) + " ";
- ps += " draw_slur";
+ ps += " draw_slur ";
Atom s;
s.str_ = ps;
Atom
Ps_lookup::stem (Real y1, Real y2) const
{
- // return Lookup::stem (y1, y2, "\\kern %\\vrule width % height % depth %");
- return Lookup::stem (y1, y2, "% % moveto % % lineto");
+ return Lookup::stem (y1, y2, "\n% % % % draw_stem ");
+}
+
+Atom
+Ps_lookup::text (String style, String text) const
+{
+ return Lookup::text (style, "(" + text + ")");
+}
+
+String
+Ps_lookup::unknown_str () const
+{
+ return "unknown ";
}
Atom
+ " " + _ ("too small") + " (" + print_dimen (y) + ")");
// y = min_y;
}
- psbracket.str_ = to_str (y) + " draw_bracket";
+ psbracket.str_ = to_str (y) + " draw_bracket ";
psbracket.dim_[Y_AXIS] = Interval (-y/2,y/2);
psbracket.dim_[X_AXIS] = Interval (0,4 PT);
return psbracket;
#include "molecule.hh"
#include "atom.hh"
#include "array.hh"
-#include "dimension.hh"
-#include "tex.hh"
#include "string-convert.hh"
#include "debug.hh"
static String
ps_font_command(int i)
{
- return "\\font" +String_convert::form_str ("%c", 'A' + i) ;
+// urg
+// return "%\\font" + String_convert::form_str ("%c", 'A' + i) + "\n";
+ return "\n/feta20 findfont 12 scalefont setfont ";
}
void
font_arr_.push (fontname);
- *outstream_l_ << "\\font" + ps_font_command (i) << "=" + fontname << "\n";
- *outstream_l_<< ps_font_command (i);
+ *outstream_l_ << "%\\font" + ps_font_command (i) << "% =" + fontname << "\n";
+ *outstream_l_<< ps_font_command (i) << "\n";
}
void
if (check_debug)
*outstream_l_ << String ("\n%start: ") << nm << "\n";
- Paper_outputter::output_molecule (m, o, nm, "% % % placebox");
+ Paper_outputter::output_molecule (m, o, nm, "% % {%}placebox \n");
}
void
Ps_outputter::start_line ()
{
- *outstream_l_ << "\\hbox{%\n";
+ *outstream_l_ << "\nstart_line {\n";
}
void
Ps_outputter::stop_line ()
{
- *outstream_l_ << "}";
- *outstream_l_ << "\\interscoreline";
+ *outstream_l_ << "}\nstop_line\n";
current_font_ = "";
font_arr_.clear ();
}
header ();
}
+Ps_stream::~Ps_stream ()
+{
+ *os << "\nshowpage\n";
+}
+
void
Ps_stream::header ()
{
- *os << _ ("%%!PS Adobe\n");
+ *os << _ ("%!PS-Adobe-3.0\n");
// urg, merge with Tex
- *os << _ ("% Creator: ");
+ *os << _ ("%%Creator: ");
if (no_timestamps_global_b)
*os << "GNU LilyPond\n";
else
*os << get_version_str () << '\n';
- *os << _ ("% Automatically generated");
+ *os << _ ("%%Automatically generated");
if (no_timestamps_global_b)
*os << ".\n";
else
}
}
-Ps_stream::~Ps_stream ()
-{
-}
-
// print string. don't forget indent.
Paper_stream&
Ps_stream::operator << (Scalar s)
#include "rod.hh"
#include "p-col.hh"
#include "debug.hh"
+#include "dimensions.hh"
#include "single-malt-grouping-item.hh"
-#include "dimension.hh"
Rod::Rod (Single_malt_grouping_item *l, Single_malt_grouping_item *r)
#include "molecule.hh"
#include "score-element.hh"
#include "debug.hh"
-#include "tex.hh"
-#include "dimension.hh"
#include "spanner.hh"
#include "line-of-score.hh"
#include "item.hh"
#include "file-results.hh"
#include "my-lily-parser.hh"
#include "source.hh"
+#include "lookup.hh"
Sources* source_global_l = 0;
Array<String> inclusion_global_array;
parser.set_version_check (version_ignore_global_b);
parser.parse_file (init_str, file_str);
+ /*
+ urg
+ when calling {Ps,Tex}_lookup::paper_stream_p (),
+ it *appears* (aaargh, latest gdb on ppc is gdb 4.16.97)
+ that (global_lookup_l's)
+ paper_l_ is invalid but not NULL
+ (deleted without being reset maybe?)
+ */
+ global_lookup_l->paper_l_ = parser.default_paper_p ();
+
if (parser.error_level_i_)
{
exit_status_i_ = 1;
(c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "dimension.hh"
#include "span-bar.hh"
#include "lookup.hh"
+#include "dimensions.hh"
#include "atom.hh"
#include "paper-def.hh"
#include "molecule.hh"
#include "spring-spacer.hh"
#include "p-col.hh"
#include "debug.hh"
+#include "dimensions.hh"
#include "qlp.hh"
#include "unionfind.hh"
#include "idealspacing.hh"
#include "pointer.tcc"
#include "score-column.hh"
#include "paper-def.hh"
-#include "dimension.hh"
#include "colhpos.hh"
Vector
#include "interval.hh"
#include "paper-def.hh"
-#include "dimension.hh"
#include "staff-side.hh"
#include "staff-sym.hh"
#include "debug.hh"
+#include "dimensions.hh"
Staff_side::Staff_side()
*/
#include "staff-sym.hh"
#include "lookup.hh"
+#include "dimensions.hh"
#include "paper-def.hh"
#include "molecule.hh"
#include "debug.hh"
-#include "dimension.hh"
#include "item.hh"
*/
#include "proto.hh"
-#include "dimension.hh"
#include "misc.hh"
#include "debug.hh"
#include "atom.hh"
*/
#include "stem.hh"
-#include "dimension.hh"
#include "debug.hh"
#include "paper-def.hh"
#include "note-head.hh"
*/
#include "misc.hh"
-#include "dimension.hh"
#include "debug.hh"
#include "real.hh"
#include "atom.hh"
#include "tex-lookup.hh"
#include "debug.hh"
#include "symtable.hh"
-#include "dimension.hh"
-#include "tex.hh"
#include "scalar.hh"
#include "paper-def.hh"
#include "string-convert.hh"
#include "main.hh"
+#include "file-results.hh"
+#include "header.hh"
+#include "paper-stream.hh"
+#include "tex-stream.hh"
+#include "tex-outputter.hh"
Tex_lookup::Tex_lookup ()
: Ps_lookup ()
return Lookup::afm_find (s, String ("\\char%d"));
}
+Atom*
+Tex_lookup::atom_p (String s, int n, Box b) const
+{
+ if (s.length_i ())
+ s.prepend ("\\");
+ for (int i = 0; i < n; i++)
+ s += "{%}";
+ return new Atom (s, b);
+}
+
+String
+Tex_lookup::character_str (int i) const
+{
+ return Lookup::character_str (i);
+}
+
Atom
Tex_lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
{
return embed (Ps_lookup::plet (dy, dx, dir));
}
+Lookup*
+Tex_lookup::lookup_p (Lookup const& l) const
+{
+ return new Tex_lookup (l);
+}
+
+Lookup*
+Tex_lookup::lookup_p (Symtables const& s) const
+{
+ return new Tex_lookup (s);
+}
+
+Paper_outputter*
+Tex_lookup::paper_outputter_p (Paper_stream* os_p, Paper_def* paper_l, Header* header_l, String origin_str) const
+{
+ if (header_global_p)
+ *os_p << header_global_p->tex_string ();
+
+ *os_p << _ ("\n% outputting Score, defined at: ") << origin_str << '\n';
+
+ if (header_l)
+ *os_p << header_l->tex_string();
+ *os_p << paper_l->tex_output_settings_str ();
+
+ if (experimental_features_global_b)
+ *os_p << "\\turnOnExperimentalFeatures%\n";
+
+ *os_p << "\\turnOnPostScript%\n";
+
+ return new Tex_outputter (os_p);
+}
+
+Paper_stream *
+Tex_lookup::paper_stream_p () const
+{
+#if 1
+ String outname = base_output_str ();
+#else
+ String outname = "lelie";
+#endif
+
+ Paper_stream* p;
+ if (outname != "-")
+ outname += ".tex";
+ *mlog << _f ("TeX output to %s...",
+ outname == "-" ? String ("<stdout>") : outname ) << endl;
+ p = new Tex_stream (outname);
+ target_str_global_array.push (outname);
+ return p;
+}
+
+String
+Tex_lookup::print_dimen (Real r) const
+{
+ String s = to_str (r, "%.3f");
+ if (s.index_i ("NaN") != -1)
+ {
+ warning (_ ("NaN"));
+ s = "0.0";
+ }
+ return Lookup::print_dimen (r) + "pt";
+}
+
Atom
Tex_lookup::ps_beam (Real slope, Real width, Real thick) const
{
return Lookup::stem (y1, y2, "\\kern %\\vrule width % height % depth %");
}
+Atom
+Tex_lookup::text (String style, String text) const
+{
+ return Lookup::text (style, text);
+}
+
+String
+Tex_lookup::unknown_str () const
+{
+ return "\\unknown";
+}
+
Atom
Tex_lookup::vbracket (Real &y) const
{
#include "molecule.hh"
#include "atom.hh"
#include "array.hh"
-#include "dimension.hh"
-#include "tex.hh"
#include "string-convert.hh"
#include "debug.hh"
#include <fstream.h>
#include <time.h>
-#include "tex.hh"
#include "main.hh"
#include "tex-stream.hh"
#include "debug.hh"
header ();
}
+Tex_stream::~Tex_stream ()
+{
+ *os << "\n\\EndLilyPondOutput";
+}
+
void
Tex_stream::header ()
{
}
}
-Tex_stream::~Tex_stream ()
-{
-}
-
// print string. don't forget indent.
Paper_stream&
Tex_stream::operator << (Scalar s)
#include "paper-def.hh"
#include "molecule.hh"
#include "text-def.hh"
-#include "dimension.hh"
#include <ctype.h>
Direction
1.0.12
1.0.12.uu1
1.0.13
+1.0.13.jcn1
+1.0.13.jcn2
+1.0.13.jcn3
+1.0.13.jcn4
+1.0.13.jcn5
+1.0.14
depth = ..
-STEPMAKE_TEMPLATES=metafont
+STEPMAKE_TEMPLATES=metafont metapost
+
+EXTRA_DIST_FILES += TODO README feta.mp mfmp.ini
-EXTRA_DIST_FILES += TODO README
FET_FILES = $(wildcard feta[0-9]*.mf)
--- /dev/null
+% feta.mp
+
+batchmode;
+
+mode_def ljfour =
+ proofing:=0; % no, we're not making proofs
+ fontmaking:=1; % yes, we are making a font
+ tracingtitles:=0; % no, don't show titles at all
+ pixels_per_inch:=600; % that's the meaning of lowres
+ blacker:=.25; % make pens a bit blacker
+ fillin:=.0; % compensate for diagonal fillin
+ o_correction:=1; % but don't overshoot as much
+ enddef;
+
+if false:
+def mode_param (suffix v) (expr e) =
+ if unknown mode_guard_.v:
+ v := e;
+ mode_guard_.v := 1;
+ fi
+enddef;
+
+% This macro is invoked by all the modes, after |pixels_per_inch|
+% has been defined, thus saving some space and time.
+def mode_common_setup_ =
+ mode_param (proofing, 0);
+ mode_param (fontmaking, 1);
+ mode_param (tracingtitles, if pixels_per_inch > 700: 1 else: 0 fi);
+enddef;
+
+% Works for a 600$\,$dpi Accel-a-Writer {\tt mackay@cs.washington.edu},
+% 16 August 95.
+mode_def ljfour = %\[ HP LaserJet 4 (600dpi)
+ mode_param (pixels_per_inch, 600);
+ mode_param (blacker, .25);
+ mode_param (fillin, 0);
+ mode_param (o_correction, 1);
+ mode_common_setup_;
+enddef;
+
+laserjetfour := ljfour;
+fi
+
+mode=ljfour;
+mag=100.0;
+
+input feta20.mf
+
--- /dev/null
+\input mfplain
+\input modes
+\dump
+
+pl 56
+ - crude metapost stuff
+
pl 55
- table-to-html stuff moved .
PACKAGE_NAME=StepMake
MAJOR_VERSION=0
MINOR_VERSION=1
-PATCH_LEVEL=55
+PATCH_LEVEL=56
MY_PATCH_LEVEL=
# use the above to send patches, always empty for released version:
--- /dev/null
+
+$(outdir)/%.pfa: %.mf
+# urg
+# i've got no idea what this scaling could be for, on both sides...
+# it seems that 'low_res', which should be all we ever need according
+# to the metapost mfplain guru, really does 200dpi, iso 600dpi (minimun)
+ -mp "&mfplain \mode=lowres; \mag=100.0; batchmode; input $<"
+# -mp "&mfmp \mode=ljfour; \mag=100.0; batchmode; input $<"
+# -mp "&mfplain modes \mode=ljfour; \mag=100.0; batchmode; \\input $<"
+# -mp "&mfplain \mode=lowres; \mag=10.0; batchmode; input $<"
+# -mp "&mfplain \mode=lowres; \mag=1.0; batchmode; input $<"
+ $(PYTHON) $(depth)/buildscripts/ps-to-pfa.py $<
+ rm -f $(basename $(@F)).[0-9]*
+ rm -f $(basename $<).log $(basename $<).tfm
+
--- /dev/null
+
+pfa: $(PFA_FILES)
+
--- /dev/null
+
+# MF_FILES := $(wildcard *.mf)
+# FONT_FILES = $(wildcard *[0-9].mf)
+# EXTRA_DIST_FILES += $(MF_FILES)
+MP_PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
+PFA_FILES += $(MP_PFA_FILES)
+
TEX_FILES = $(wildcard *.tex)
-EXTRA_DIST_FILES = $(TEX_FILES)
+
+EXTRA_DIST_FILES = $(TEX_FILES) lilyponddefs.ps
INSTALLATION_DIR=$(TEXDIR)/lilypond
INSTALLATION_FILES=$(TEX_FILES)
--- /dev/null
+%!PS-Adobe-3.0: lilyponddefs
+
+% hmm
+/setgray { 1 add } bind def
+
+/xoffset 30 def
+/yoffset 700 def
+/staffrulethickness 1 def
+/staffheight 20 def
+
+% round cappings
+1 setlinecap
+
+/placebox
+{
+ /object exch def
+ gsave
+ exch translate
+ 0 0 moveto
+ object
+ grestore
+} bind def
+
+/settext
+{
+ gsave
+ % urg
+ /Times-Roman findfont 12 scalefont setfont
+ show
+ grestore
+} bind def
+
+/vrule % width height depth
+{
+ gsave
+ 3 -1 roll setlinewidth
+ neg 0 exch moveto
+ 0 exch lineto stroke
+ grestore
+} bind def
+
+/draw_stem % kern width height depth
+{
+ gsave
+ 4 -1 roll neg 0 translate
+ vrule
+ grestore
+} bind def
+
+/widthbar % height width
+{
+ gsave
+ setlinewidth
+ 2 div dup neg 0 exch moveto
+ 0 exch lineto stroke
+ 2 div
+ grestore
+} bind def
+
+/thickbar % height
+{
+ stafflinethickness 2 mul widthbar
+} bind def
+
+/thinbar % height
+{
+ stafflinethickness 1.6 mul widthbar
+} bind def
+
+/maatstreep
+{
+ thinbar
+} bind def
+
+/finishbar
+{
+ thickbar
+} bind def
+
+/generalmeter
+{
+} bind def
+
+/pianobrace
+{
+ gsave
+ /feta-braces20 findfont 12 scalefont setfont%
+ show
+ grestore
+} bind def
+
+/repeatbar
+{
+} bind def
+
+/start_line
+{
+ gsave
+ xoffset yoffset translate
+} bind def
+
+/stop_line
+{
+ /object exch def
+ 0 0 moveto pathbbox exch pop sub exch pop
+ object
+ grestore
+ yoffset add /yoffset exch def
+ % urg...
+ yoffset staffheight 8 mul sub /yoffset exch def
+} bind def
+
+/unknown {} bind def
+
+/turnOnExperimentalFeatures { } bind def
+
+/rulesym % thick length
+{
+ gsave
+ exch setlinewidth
+ 0 lineto stroke
+ grestore
+} bind def
+
+/draw_beam
+{
+ 2 div /beam_thick exch def
+ /beam_slope exch def
+ /beam_wd exch def
+ beam_slope beam_wd mul /beam_ht exch def
+ 0 beam_thick neg moveto
+ beam_wd beam_ht rlineto
+ 0 beam_thick 2 mul rlineto
+ 0 beam_thick lineto
+ closepath fill
+} bind def
+%
+/draw_decresc
+ {
+ staffrulethickness setlinewidth
+ /cresc_cont exch def
+ /cresc_ht exch def
+ /cresc_wd exch def
+%
+ cresc_wd cresc_cont moveto
+ 0 cresc_ht lineto
+ stroke
+ cresc_wd cresc_cont neg moveto
+ 0 cresc_ht neg lineto
+ stroke
+ }
+ bind def
+ /draw_cresc
+ {
+ staffrulethickness setlinewidth
+ /cresc_cont exch def
+ /cresc_ht exch def
+ /cresc_wd exch def
+%
+ 0 cresc_cont moveto
+ cresc_wd cresc_ht lineto
+ stroke
+ 0 cresc_cont neg moveto
+ cresc_wd cresc_ht neg lineto
+ stroke
+ }
+ bind def
+ /lily_distance {
+ 1 copy mul exch 1 copy mul add sqrt
+ } bind def
+staffrulethickness 1.2 mul /plet_t exch def
+/draw_plet
+{
+ plet_t setlinewidth
+ true setstrokeadjust
+ 1 setlinecap
+ 1 setlinejoin
+ /dir exch def
+ /plet_dy exch def
+ /plet_dx exch def
+ staffheight 2 div /plet_gapx exch def
+ plet_dy plet_dx div plet_gapx mul /plet_gapy exch def
+ staffheight 4 div dir mul /plet_h exch def
+%
+ 0 0 moveto
+ 0 plet_h lineto
+ plet_dx plet_gapx sub 2 div
+ plet_dy plet_gapy sub 2 div plet_h add lineto
+ plet_dx plet_gapx add 2 div
+ plet_dy plet_gapy add 2 div plet_h add moveto
+ plet_dx plet_dy plet_h add lineto
+ plet_dx plet_dy lineto
+ stroke
+} bind def
+%
+/draw_slur
+{
+ staffrulethickness setlinewidth
+ moveto
+ curveto
+ lineto
+ curveto
+ gsave
+ fill
+ grestore
+ stroke
+} bind def
+%
+/draw_dashed_slur
+{
+ 1 setlinecap
+ 1 setlinejoin
+ setdash
+ setlinewidth
+ moveto
+ curveto
+ stroke
+} bind def
+%
+staffheight 4 div /interline exch def
+%
+/bracket_traject
+{
+ /traject_ds exch def
+ /traject_alpha exch def
+ traject_ds traject_alpha sin mul add
+ exch
+ traject_ds traject_alpha cos mul add
+ exch
+} bind def
+%
+% too fat for 20pt
+% interline 2 div /bracket_b exch def
+interline 3 div /bracket_b exch def
+interline 2 mul /bracket_w exch def
+staffrulethickness /stafflinethickness exch def
+stafflinethickness 2 mul /bracket_t exch def
+interline 1.5 mul /bracket_v exch def
+bracket_v /bracket_u exch def
+50 /bracket_alpha exch def
+%
+/half_bracket
+{
+%6
+ 0 0
+%5a
+ bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
+ bracket_alpha bracket_v -0.15 mul bracket_traject
+%5b
+ 1 bracket_h
+ 0 bracket_v 0.5 mul bracket_traject
+%5c
+ 0 bracket_h
+%4a
+ bracket_b bracket_h bracket_t sub
+ 0 bracket_v 0.4 mul bracket_traject
+%4b
+ bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
+ bracket_alpha bracket_v -0.25 mul bracket_traject
+%4c
+ bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
+%3
+ bracket_b bracket_h bracket_t sub
+%2
+ bracket_b 0
+%1
+ 0 0
+} bind def
+%
+/draw_half_bracket {
+ moveto
+ lineto
+ lineto
+ curveto
+ curveto
+ lineto
+ gsave
+ fill
+ grestore
+} bind def
+%
+/draw_bracket
+{
+ 2 div bracket_b add /bracket_h exch def
+ bracket_t setlinewidth
+ true setstrokeadjust
+ 1 setlinecap
+ 1 setlinejoin
+ half_bracket
+ 20 copy
+ 1 -1 scale
+ draw_half_bracket
+ stroke
+ 1 -1 scale
+% ugh, ugh:
+ 0.05 0 translate
+ draw_half_bracket
+ stroke
+} bind def
+
+stafflinethickness setlinewidth
+
+% see if we're there...
+% 10 setlinewidth 0 0 moveto 400 800 lineto stroke