]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/stencil-scheme.cc: remove ly:fontify-atom
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Apr 2004 13:59:56 +0000 (13:59 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Apr 2004 13:59:56 +0000 (13:59 +0000)
* 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
lily/font-metric.cc
lily/stencil-scheme.cc
scm/output-pdftex.scm
scm/output-sketch.scm
scm/output-sodipodi.scm
scm/stencil.scm

index 06da304b4c93d20d8bbe4ae380e33d0d779aa1bf..524dc52225cc6a5fa8e39ba031074cbe0f0c131f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 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
index 18a91d8b8c4902877b8783fa50343c19027d3a1f..1f63dbf95156f8faa16e47a7cdc487bb76ea3c32 100644 (file)
@@ -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);
 }
index 9108744dc332fcd6989e45acfb4609806ec4a2e6..4b9fb23e2a65c7b704a54bc178361e7948b41d76 100644 (file)
@@ -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),
index d7e6e259dda4acd730b8a6daf4160d71d09e58c5..d6d3e44ce369424482ee6f8b9cf519e2a47e3ded 100644 (file)
 
 (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)
index 398c52da5c1dbb66fee37732b39d436be96bd451..69af56f3518309cfd6ba4b1978a58f0444a32208 100644 (file)
 (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)
index 5d79103a5f6f6f9fe58f2ae52d238570e8bd08c5..18fcf28f00f13e1ce2b21845b486b33d520761a8 100644 (file)
@@ -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))
          (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"))
 
index bad27138e5e47d5e6126c79e4dbab32374b373f1..2b1720f131a8e41db971735870aec7b0252270ef 100644 (file)
           (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."