]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/stencil.scm (fontify-text): reinstate function
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 18 May 2004 21:09:39 +0000 (21:09 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 18 May 2004 21:09:39 +0000 (21:09 +0000)
* tex/lily-ps-defs.tex: remove lilypondblotdiam def.

* lily/book-paper-def.cc (Book_paper_def): add copy ctor.

ChangeLog
lily/book-paper-def.cc
lily/include/book-paper-def.hh
scm/stencil.scm
tex/lily-ps-defs.tex

index 1da111720807aad9f2ff6310d8a2cab15d70308d..96c808f64997f58d594f49cac165b2500e47d499 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-05-18  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * scm/stencil.scm (fontify-text): reinstate function
+
+       * tex/lily-ps-defs.tex: remove lilypondblotdiam def.
+
        * lily/book-paper-def.cc (Book_paper_def): add copy ctor.
 
        * lily/parser.yy (book_paper_head): \bookpaper {} 
index 7aa837dc90fcef1852499f01068cf8a58bc2c0a9..1c4d048d6f147b624fd2ac3596ec3897254878ac 100644 (file)
@@ -196,3 +196,18 @@ LY_DEFINE (ly_bookpaper_outputscale, "ly:bookpaper-outputscale",
   SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "bookpaper");
   return scm_make_real (b->output_scale_);
 }
+
+
+SCM
+Book_paper_def::lookup_variable (SCM sym) const
+{
+  SCM var = ly_module_lookup (scope_, sym);
+
+  return scm_variable_ref (var);
+}
+
+SCM
+Book_paper_def::c_variable (String s) const
+{
+  return lookup_variable (ly_symbol2scm (s.to_str0 ()));
+}
index 144df004a72c8571336c3d47d9accff688c826e2..e022e315b349835aa3d0706bd13d92d564250b1d 100644 (file)
@@ -25,6 +25,8 @@ public:
   Real output_scale_;
 
   Book_paper_def ();
+  SCM c_variable (String id) const;
+  SCM lookup_variable (SCM sym) const;
 
   Font_metric *find_scaled_font (Font_metric *f, Real m, SCM input_enc_name);
   Paper_def *scale_paper (Paper_def *pd) const;
index 2b1720f131a8e41db971735870aec7b0252270ef..8f60fa0bec615d9a0267895699bfe1cf37f1410e 100644 (file)
@@ -74,3 +74,10 @@ encloses the contents.
     (set! stil (ly:stencil-combine-at-edge stil Y -1 x-rule 0.0))
     
     stil))
+
+(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
+     `(text ,font-metric ,text) (car b) (cdr b))))
+
index 8a4522a2e72048a8fe547e359ee2afc80d890ccf..d3c4fc07c675c2fb66f720c9af621933664aebb1 100644 (file)
       \string"
       lyscale\lilypondpaperoutputscale\lilypondspace ##1}
   }
-
-  \lilypondifundefined{lilypondpaperblotdiameterps}
-    {\lilypondsetdimen{lilypondpaperblotdiameter}}
-    {}
 }
 
 \gdef\lilypondexperimentalfeatures{}