* scm/framework-texstr.scm (header): dump in new format.
+2004-12-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/output-texstr.scm (text): use \lilygetmetrics
+
+ * scm/framework-texstr.scm (header): dump in new format.
+
+ * tex/lilypond-tex-metrics: new file.
+
2004-12-27 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/pango-font.cc (text_stencil): Quick try at glyph->charcode
2004-12-25 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/main.cc: use TeX as default output format.
+
+ * flower/file-path.cc (find): try to open directly as well, so we
+ find absolute path files.
+
+ * lily/pango-select.cc: new file.
+
* scm/framework-ps.scm: remove all encoding code.
load pfb/pfa for PangoFont too.
-%
-% This is NOT a lilypond input file. It is an ABC file, see
-% http://www.gre.ac.uk/~c.walshaw/abc/
-%
-% LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
-%
-X:1
-T:Paddy O'Rafferty
-C:Trad.
-M:6/8
-K:D
-dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB||
-~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA||
-fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:|
+\version "2.3.25"
+\header {
+ composer = "Trad."
+ crossRefNumber = "1"
+ footnotes = ""
+ tagline = "Lily was here (unknown version) -- automatically converted from ABC"
+ title = "Paddy O'Rafferty"
+}
+voicedefault = {
+\set Score.defaultBarType = "empty"
+% This is NOT a lilypond input file. It is an ABC file, see
+ % http://www.gre.ac.uk/~c.walshaw/abc/
+ %
+ % LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
+ \time 6/8 d''8 f''8 f''8 c''8 e''8 e''8 \bar "|" d''8
+e''8 f''8 g''8 f''8 e''8 \bar "|" d''8 f''8 f''8 c''8
+ e''8 e''8 \bar "|" d''8 f''8 e''8 d''8 b'8 a'8 \bar "|"
+ d''8 f''8 f''8 c''8 e''8 e''8 \bar "|" d''8 e''8 f''8
+ g''8 f''8 e''8 \bar "|" f''8 a''8 f''8 g''8 f''8 e''8
+ \bar "|" d''8 f''8 e''8 d''8 b'8 a'8 \bar ":|" d''8
+f''8 e''8 d''8 c''8 b'8 \bar "||" a'4. ^"~" b'4. \bar "|"
+ g''8 f''8 e''8 f''8 d''8 b'8 \bar "|" a'8 f'8 a'8
+b'4 c''8 \bar "|" d''8 f''8 e''8 d''8 c''8 b'8 \bar "|"
+a'4. ^"~" b'4. ^"~" \bar "|" e''8 f''8 e''8 e''8 f''8 g''8
+ \bar "|" f''8 a''8 f''8 g''8 f''8 e''8 \bar "|" d''8
+f''8 e''8 d''8 c''8 b'8 \bar ":|" d''8 f''8 e''8 d''8
+ b'8 a'8 \bar "||" f''8 a'8 a'8 e''8 a'8 a'8 \bar "|"
+d''8 e''8 f''8 g''8 f''8 e''8 \bar "|" f''8 a'8 a'8
+e''8 a'8 a'8 \bar "|" d''8 f''8 e''8 d''8 b'8 a'8
+\bar "|" f''8 a'8 a'8 e''8 a'8 a'8 \bar "|" d''8 e''8
+f''8 g''8 f''8 e''8 \bar "|" f''8 a''8 f''8 g''8 f''8
+ e''8 \bar "|" d''8 f''8 e''8 d''8 b'8 a'8 \bar ":|"
+
+}
+\score{
+ <<
+
+ \context Staff="default"
+ {
+ \voicedefault
+ }
+
+ >>
+ \layout {
+ }
+ \midi {}
+}
/* Selected output format.
One of tex, ps, scm, as.
*/
-String output_format_global = "ps";
+String output_format_global = "tex";
/* Current output name. */
String output_name_global;
String str = ly_scm2string (markup);
#if HAVE_PANGO_FT2
- if (output_format_global != "tex")
+ if (output_format_global != "tex"
+ && output_format_global != "texstr")
{
Font_metric *fm = select_pango_font (layout, props);
return fm->text_stencil (str).smobbed_copy ();
Buildrequires: texinfo >= 4.7
Buildrequires: guile-devel >= 1.6.4-8
Buildrequires: freetype-devel >= 2.1
-Buildrequires: fontforge >= 20041211
+#Buildrequires: fontforge >= 20041211
Requires: tetex tetex-latex libstdc++ python tetex-dvips tetex-latex
Requires: guile >= 1.6.4-8 ec-fonts-mftraced >= 1.0.5
(lily))
-(define (define-fonts paper)
- ;; UGH. FIXME.
- (format "(globalscale ~a)\n" (ly:paper-outputscale paper)))
+(define (header filename)
+ (format "% header
+\\input{lilypond-tex-metrics}
+\\documentclass{article}
+\\lilyglobalscale{1.0}
+\\lilymetricsfile{~a.lpm}
+\\begin{document}
+" filename))
+
+(define (footer)
+ "
+\\end{document}
+")
(define-public (output-framework outputter book scopes fields basename )
(let* ((paper (ly:paper-book-paper book))
(pages (ly:paper-book-pages book))
)
- (ly:outputter-dump-string outputter (define-fonts paper))
+ (ly:outputter-dump-string outputter (header basename))
(for-each
(lambda (page)
(ly:outputter-dump-stencil outputter page))
- pages)))
+ pages)
+ (ly:outputter-dump-string outputter (footer))))
(if (string? what)
what
""))
-
-(define-public (text font s)
+
+(define-public (text font str)
(call-with-output-string
(lambda (port)
- (write (list
- (ly:font-file-name font)
- (ly:font-magnification font)
- s) port)
- (newline port))))
+ (display (format "\\lilygetmetrics{~a~a}{~a}{1.0}{~a}\n"
+ (hash str 10000000)
+ (ly:font-file-name font)
+ (ly:font-file-name font)
+ str) port)
+ )))