+2004-09-28 Werner Lemberg <wl@gnu.org>
+
+ * scm/framework-tex.scm (font-load-command): Define proper font
+ macro which sets font encoding if available.
+ (define-fonts): Define \lilypondpaperinputencoding, to be taken
+ from the \bookpaper block.
+
+ * tex/lilyponddefs.tex (\lilypondstart): Use
+ \lilypondpaperinputencoding for global input encoding.
+
2004-09-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/score.cc (Score): oops. Copy error_found_ too.
(inexact->exact (round (* 1000 (ly:font-magnification font)))))))
(define (font-load-command bookpaper font)
- (string-append
- "\\font\\" (tex-font-command font) "="
- (ly:font-filename font)
- " scaled "
- (ly:number->string (inexact->exact
- (round (* 1000
- (ly:font-magnification font)
- (ly:bookpaper-outputscale bookpaper)))))
- "\n"))
+ (let* ((coding-alist (ly:font-encoding-alist font))
+ (font-encoding (assoc-get 'output-name coding-alist))
+ )
+ (string-append
+ "\\font\\lilypond" (tex-font-command font) "="
+ (ly:font-filename font)
+ " scaled "
+ (ly:number->string (inexact->exact
+ (round (* 1000
+ (ly:font-magnification font)
+ (ly:bookpaper-outputscale bookpaper)))))
+ "\n"
+ "\\def\\" (tex-font-command font) "{%\n"
+ ;; UGH. Should be handled via alist.
+ (if (equal? "Extended-TeX-Font-Encoding---Latin" font-encoding)
+ " \\fontencoding{T1}\\selectfont"
+ " ")
+ "\\lilypond" (tex-font-command font)
+ "}\n"
+ )))
(define (define-fonts bookpaper)
(ly:bookpaper-outputscale bookpaper))))
(tex-string-def "lilypondpaper" 'papersize
(eval 'papersize (ly:output-def-scope bookpaper)))
+ (tex-string-def "lilypondpaper" 'inputencoding
+ (eval 'inputencoding (ly:output-def-scope bookpaper)))
(apply string-append
(map (lambda (x) (font-load-command bookpaper x))
\documentclass[a4paper]{article}
%% safe-mode
\nofiles
- \usepackage{inputenc}
+ \usepackage[\lilypondpaperinputencoding]{inputenc}
\pagestyle{empty}
\lilypondifundefined{lilypondclassic}
{%% Nullify [La]TeX page layout settings, page layout by LilyPond.