From de783bae86a0d5b57340c7fa6a9cc5ee6f149d3b Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 22:47:39 +0000 Subject: [PATCH] lilypond-1.3.48 --- Documentation/topdocs/index.tely | 4 +++- lily/font-metric.cc | 22 ++++++++++++++-------- scripts/ly2dvi.py | 18 +++--------------- 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely index 326173916e..a989d8ad21 100644 --- a/Documentation/topdocs/index.tely +++ b/Documentation/topdocs/index.tely @@ -100,7 +100,9 @@ Sankey}, harpsichordist to the internet, is typesetting the complete by Scarlatti}. Jeff Covey, guitar player and overall nice guy, is putting @uref{http://www4.smart.net/~jcovey/scores/,guitar music} on the net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is a -large archive of public domain sheet music under construction. +large archive of public domain sheet music under construction. Dirk +Latterman also put some works on the web @html diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 1f54aa5ead..f11483f8f0 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -4,7 +4,8 @@ source file of the GNU LilyPond music typesetter (c) 1999--2000 Han-Wen Nienhuys - + + Mats Bengtsson (the ugly TeX parsing in text_dimension) */ #include @@ -22,23 +23,29 @@ Font_metric::text_dimension (String text) const for (int i = 0; i < text.length_i (); i++) { - if (text[i]=='\\') + switch (text[i]) { - for (i++; (i < text.length_i ()) && isalpha(text[i]); i++) + case '\\': + for (i++; (i < text.length_i ()) && !isspace(text[i]) + && text[i]!='{' && text[i]!='}'; i++) ; // ugh. i--; // Compensate for the increment in the outer loop! - } - else - { + break; + case '{': // Skip '{' and '}' + case '}': + break; + + default: Box b = get_char ((unsigned char)text[i],false); - + // Ugh, use the width of 'x' for unknown characters if (b[X_AXIS].length () == 0) b = get_char ((unsigned char)'x',false); w += b[X_AXIS].length (); ydims.unite (b[Y_AXIS]); + break; } } if (ydims.empty_b ()) @@ -74,7 +81,6 @@ Font_metric::Font_metric (Font_metric const &) } - Box Font_metric::get_char (int, bool)const { diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 730273ea3c..e17b41b1f1 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -245,8 +245,6 @@ class TeXOutput: pageheight = Props.get('pageheight') pagewidth = Props.get('pagewidth') - horizontalMarginArg = ( (pagewidth - linewidth)/2 ) - verticalMarginArg = ( (pageheight - textheight)/2 ) top= r""" %% Creator: %s @@ -265,16 +263,7 @@ class TeXOutput: %%\headheight9pt %%\headsep0pt %% Maybe this is too drastic, but let us give it a try. -\headheight0pt -\headsep2mm -\footskip2mm -%% -%%\addtolength{\oddsidemargin}{-1cm} -%%\addtolength{\topmargin}{-1cm} -%%\setlength{\textwidth}{%s} -%%\setlength{\textheight}{%s} -%% -\geometry{width=%spt, left=%spt, height=%spt, top=%spt} +\geometry{width=%spt, height=%spt,headheight=2mm,headsep=0pt,footskip=2mm} \input lilyponddefs \input titledefs %s @@ -286,9 +275,8 @@ class TeXOutput: \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}%% \begin{document} """ % ( program_id(), Props.get('filename'), now, Props.get('papersize'), - Props.get('language'), Props.get('pagenumber'), linewidth, textheight, - linewidth, horizontalMarginArg, textheight, verticalMarginArg, - Props.get('header') ) + Props.get('language'), Props.get('pagenumber'), linewidth, + textheight, Props.get('header') ) base, ext = os.path.splitext(file) this.__base = base -- 2.39.5