* lily/scaled-font-metric.cc (derived_mark): idem.
* lily/scaled-font-metric.cc (derived_mark): is a const method.
(Modified_font_metric): make alist for coding_description_
(LY_DEFINE): remove coding-name.
* lily/scaled-font-metric.cc (ly_font_encoding): return vector
2004-04-07 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/stencil-scheme.cc: remove ly:fontify-atom
+
* ly/portuges.ly (pitchnames): new file.
* lily/include/lily-guile.hh: many new ly_ functions. Thanks to
Stencil
Font_metric::get_ascii_char_stencil (int code) const
{
- SCM at = scm_list_2 (ly_symbol2scm ("char"), scm_int2num (code));
- at = fontify_atom (this, at);
+ SCM at = scm_list_3 (ly_symbol2scm ("char"),
+ this->self_scm (),
+ scm_int2num (code));
Box b = get_ascii_char (code);
return Stencil (b, at);
}
Stencil
Font_metric::get_indexed_char_stencil (int code) const
{
- SCM at = scm_list_2 (ly_symbol2scm ("char"), scm_int2num (code));
- at = fontify_atom (this, at);
+ SCM at = scm_list_3 (ly_symbol2scm ("char"),
+ self_scm (),
+ scm_int2num (code));
Box b = get_indexed_char (code);
return Stencil (b, at);
}
return s.smobbed_copy ();
}
-SCM
-fontify_atom (Font_metric const *met, SCM f)
-{
- if (f == SCM_EOL)
- return f;
- else
- return scm_list_n (ly_symbol2scm ("fontify"),
- met->self_scm (), f, SCM_UNDEFINED);
-}
-
-LY_DEFINE (ly_fontify_atom,"ly:fontify-atom",
- 2, 0, 0, (SCM met, SCM f),
- "Add a font selection command for the font metric @var{met} "
- "to @var{f}.")
-{
- SCM_ASSERT_TYPE (unsmob_metrics (met), met, SCM_ARG1, __FUNCTION__, "font metric");
-
- return fontify_atom (unsmob_metrics (met), f);
-}
LY_DEFINE (ly_align_to_x, "ly:stencil-align-to!",
3, 0, 0, (SCM stil, SCM axis, SCM dir),
(define (repeat-slash w a t)
(embedded-pdf (list 'repeat-slash w a t)))
-(define (fontify name-mag-pair exp)
- (string-append (select-font name-mag-pair)
- exp))
(define (tex-encoded-fontswitch name-mag)
(define font-count 0)
(define current-font "")
-(define (fontify x y name-mag-pair exp)
- (string-append (select-font name-mag-pair)
- (apply (eval (car exp) this-module)
- (append (list x y) (cdr exp)))))
-;; (if (string? exp) exp "")))
-
(define (define-fonts x) "")
(define (font-def x)
;;; and should intercept:
;;;
-;;; fontify
;;; lily-def
;;; header-end
;;; define-fonts
(cond
((eq? keyword 'some-func) "")
;;((eq? keyword 'placebox) (dispatch (cadddr expr)))
- ;;((eq? keyword 'fontify) (dispatch (caddr expr)))
(else
(if (module-defined? this-module keyword)
(apply (eval keyword this-module) (cdr expr))
(format #t "font not found: ~s\n" (caadr name-mag-pair))
(cdr (assoc "feta20" font-alist))))))
-(define (fontify name-mag-pair expr)
- (string-append
- (tagify "text" (dispatch expr) (cons 'style (get-font name-mag-pair)))))
-
(define (header-end)
(comment "header-end"))
(stack-lines dir padding baseline (cdr stils))
padding baseline))))
-(define-public (fontify-text font-metric text)
- "Set TEXT with font FONT-METRIC, returning a stencil."
- (let* ((b (ly:text-dimension font-metric text)))
- (ly:make-stencil
- (ly:fontify-atom font-metric `(text ,text)) (car b) (cdr b))))
-
(define-public (bracketify-stencil stil axis thick protusion padding)
"Add brackets around STIL, producing a new stencil."