cm fonts.
* mf/feta-beugel.mf: don't multiply font_count by 10.
* lily/lookup.cc (horizontal_line): new function. Use
horizontal-line in output backends.
2003-07-15 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * scm/output-ps.scm (lily-traced-cm-fonts): substitution for lily
+ cm fonts.
+
+ * mf/feta-beugel.mf: don't multiply font_count by 10.
+
+ * lily/lookup.cc (horizontal_line): new function. Use
+ horizontal-line in output backends.
+
* Documentation/user/tutorial.itely (An orchestral part): new
section on orchestral stuff and identifiers.
static Molecule roundfilledbox (Box b, Real blotdiameter);
static Molecule repeat_slash (Real w, Real slope, Real th);
static Molecule line (Real th, Offset from, Offset to);
+ static Molecule horizontal_line (Interval w, Real th);
static Molecule triangle (Interval, Real, Real);
};
Molecule
Lookup::line (Real th, Offset f, Offset t)
{
- SCM at = (scm_list_n (ly_symbol2scm ("draw-line"),
+ SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
gh_double2scm (th),
gh_double2scm (f[X_AXIS]),
gh_double2scm (f[Y_AXIS]),
gh_double2scm (t[X_AXIS]),
gh_double2scm (t[Y_AXIS]),
- SCM_UNDEFINED));
+ SCM_UNDEFINED);
Box box;
box.add_point (f);
return Molecule (box, at);
}
+Molecule
+Lookup::horizontal_line (Interval w, Real th)
+{
+ SCM at = scm_list_n (ly_symbol2scm ("horizontal-line"),
+ gh_double2scm (w[LEFT]),
+ gh_double2scm (w[RIGHT]),
+ gh_double2scm (th),
+ SCM_UNDEFINED);
+
+
+ Box box ;
+ box[X_AXIS] = w;
+ box[Y_AXIS] = Interval (-th/2,th/2);
+
+ return Molecule (box, at);
+}
+
Molecule
Lookup::blank (Box b)
for (int i=0; i < l; i++)
{
Molecule a =
- Lookup::filledbox (Box (Interval (0,width),
- Interval (-t/2, t/2)));
+ Lookup::horizontal_line (Interval (0,width), t);
a.translate_axis (height - i * staff_space (me), Y_AXIS);
m.add_molecule (a);
font_coding_scheme "feta braces";
-fet_beginfont("feta-braces", font_count * 10 );
+fet_beginfont("feta-braces", font_count);
mode_setup;
(define (experimental-on)
"")
+(define (horizontal-line x1 x2 th)
+ (filledbox (- x1) (- x2 x1) (* .5 th) (* .5 th )))
+
+
(define (filledbox breapth width depth height)
(let ((dx (+ width breapth))
(dy (+ depth height)))
(use-modules
(guile)
+ (ice-9 regex)
(lily))
;;; Lily output interface --- cleanup and docme
-
+;; TODO: fucks up if outputting strings with parentheses.
;; Module entry
(define-public (ps-output-expression expr port)
(ly:number->string (* 10 thick))
" ] 0 draw_dashed_slur"))
+(define lily-traced-cm-fonts
+ (map symbol->string
+ '(cmbx14
+ cmbx17
+ cmbxti12
+ cmbxti14
+ cmbxti7
+ cmbxti8
+ cmcsc12
+ cmcsc7
+ cmtt17)))
+
(define (define-fonts internal-external-name-mag-pairs)
(define (font-load-command name-mag command)
-
+
+ ;; frobnicate NAME to jibe with external definitions.
(define (possibly-capitalize-font-name name)
- (if (equal? (substring name 0 2) "cm")
- (string-upcase name)
- name))
+ (cond
+ ((and (equal? (substring name 0 2) "cm")
+ (not (member name lily-traced-cm-fonts)))
+ (string-upcase name))
+ ((equal? (substring name 0 4) "feta")
+ (regexp-substitute/global #f "feta([a-z-]*)([0-9]+)" name 'pre "GNU-LilyPond-feta" 1 "-" 2 'post))
+ (else name)))
(string-append
"/" command
(define (filledbox breapth width depth height)
(string-append (numbers->string (list breapth width depth height))
- " draw_box" ))
+ " draw_box"))
+
+(define (horizontal-line x1 x2 th)
+ (draw-line th x1 0 x2 0))
(define (fontify name-mag-pair exp)
sodipodi:docname='/tmp/x'>
<defs
id='defs3' />
- <sodipodi:namedview
+ <podi:namedview
id='base' />
<g transform='translate(10,10) scale (1.0)'>
")
(define (end-output)
"</g></svg>")
+;;TODO
+;(define (horizontal-line x1 x2 th)
+; (draw-line th x1 0 x2 0))
+
(define (filledbox breapth width depth height)
(roundfilledbox breapth width depth height line-thickness))
(define (stop-last-system)
"}%\n")
+(define (horizontal-line x1 x2 th)
+ (filledbox (- x1) (- x2 x1) (* .5 th) (* .5 th )))
+
(define (filledbox breapth width depth height)
(if (and #f (defined? 'ps-testing))
(embedded-ps
(define (draw-line thick fx fy tx ty)
(embedded-ps (list 'draw-line thick fx fy tx ty)))
+;; TODO: this should be a default, which is overriden in PS
(define (between-system-string string)
string
)