From 9b9832aace4ee992387ed419efab3b803b4468e6 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 7 Apr 2004 13:59:56 +0000 Subject: [PATCH] * lily/stencil-scheme.cc: remove ly:fontify-atom * 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 --- ChangeLog | 2 ++ lily/font-metric.cc | 10 ++++++---- lily/stencil-scheme.cc | 19 ------------------- scm/output-pdftex.scm | 3 --- scm/output-sketch.scm | 6 ------ scm/output-sodipodi.scm | 6 ------ scm/stencil.scm | 6 ------ 7 files changed, 8 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06da304b4c..524dc52225 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-04-07 Han-Wen Nienhuys + * 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 diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 18a91d8b8c..1f63dbf951 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -220,8 +220,9 @@ Font_metric::index_to_ascii (int i) const 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); } @@ -229,8 +230,9 @@ Font_metric::get_ascii_char_stencil (int code) const 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); } diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index 9108744dc3..4b9fb23e2a 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -210,25 +210,6 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil", 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), diff --git a/scm/output-pdftex.scm b/scm/output-pdftex.scm index d7e6e259dd..d6d3e44ce3 100644 --- a/scm/output-pdftex.scm +++ b/scm/output-pdftex.scm @@ -116,9 +116,6 @@ (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) diff --git a/scm/output-sketch.scm b/scm/output-sketch.scm index 398c52da5c..69af56f351 100644 --- a/scm/output-sketch.scm +++ b/scm/output-sketch.scm @@ -164,12 +164,6 @@ (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) diff --git a/scm/output-sodipodi.scm b/scm/output-sodipodi.scm index 5d79103a5f..18fcf28f00 100644 --- a/scm/output-sodipodi.scm +++ b/scm/output-sodipodi.scm @@ -39,7 +39,6 @@ ;;; and should intercept: ;;; -;;; fontify ;;; lily-def ;;; header-end ;;; define-fonts @@ -62,7 +61,6 @@ (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)) @@ -291,10 +289,6 @@ (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")) diff --git a/scm/stencil.scm b/scm/stencil.scm index bad27138e5..2b1720f131 100644 --- a/scm/stencil.scm +++ b/scm/stencil.scm @@ -24,12 +24,6 @@ (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." -- 2.39.5