]> git.donarmstrong.com Git - lilypond.git/commitdiff
new file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 8 Jan 2005 12:30:11 +0000 (12:30 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 8 Jan 2005 12:30:11 +0000 (12:30 +0000)
lily/output-def-scheme.cc
lily/paper-def.cc
lily/tweak-registration-scheme.cc

index 88d6f28c49666e76d8788141171128078f45abcf..b22f43407116a807e27d566dda012b65ff2180d8 100644 (file)
@@ -8,6 +8,8 @@
 */
 
 #include "font-metric.hh"
+#include "pango-font.hh"
+#include "modified-font-metric.hh"
 #include "output-def.hh"
 #include "ly-module.hh"
 #include "context-def.hh"
@@ -121,3 +123,36 @@ LY_DEFINE (ly_paper_get_number, "ly:paper-get-number", 2, 0, 0,
                   __FUNCTION__, "layout definition");
   return scm_make_real (layout->get_dimension (name));
 }
+
+LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
+          1, 0, 0,
+          (SCM bp),
+          "Return fonts from the @code{\\paper} block @var{bp}.")
+{
+  Output_def *b = unsmob_output_def (bp);
+
+  SCM font_table = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
+  
+  SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
+
+  SCM ell = SCM_EOL;
+  if (scm_hash_table_p (font_table) == SCM_BOOL_T)
+    {
+      SCM func = ly_lily_module_constant ("hash-table->alist");
+
+      for (SCM s = scm_call_1 (func, font_table); scm_is_pair (s);
+          s = scm_cdr (s))
+       {
+         SCM entry = scm_car (s);
+         for (SCM t = scm_cdr (entry); scm_is_pair (t); t = scm_cdr (t))
+           {
+             Font_metric *fm = unsmob_metrics (scm_cdar (t));
+
+             if (dynamic_cast<Modified_font_metric*> (fm)
+                 || dynamic_cast<Pango_font*> (fm))
+               ell = scm_cons (fm->self_scm (), ell);
+           }
+       }
+    }
+  return ell;
+}
index a46fb43fc17d4aa96b2be03a96b4f62459c1301a..36063561691d9e4252c8ec70a96dd168e3caf3ff 100644 (file)
@@ -73,35 +73,3 @@ scale_output_def (Output_def *o, Real amount)
   return unsmob_output_def (new_pap);
 }
 
-LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
-          1, 0, 0,
-          (SCM bp),
-          "Return fonts from the @code{\\paper} block @var{bp}.")
-{
-  Output_def *b = unsmob_output_def (bp);
-
-  SCM font_table = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
-  
-  SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
-
-  SCM ell = SCM_EOL;
-  if (scm_hash_table_p (font_table) == SCM_BOOL_T)
-    {
-      SCM func = ly_lily_module_constant ("hash-table->alist");
-
-      for (SCM s = scm_call_1 (func, font_table); scm_is_pair (s);
-          s = scm_cdr (s))
-       {
-         SCM entry = scm_car (s);
-         for (SCM t = scm_cdr (entry); scm_is_pair (t); t = scm_cdr (t))
-           {
-             Font_metric *fm = unsmob_metrics (scm_cdar (t));
-
-             if (dynamic_cast<Modified_font_metric*> (fm)
-                 || dynamic_cast<Pango_font*> (fm))
-               ell = scm_cons (fm->self_scm (), ell);
-           }
-       }
-    }
-  return ell;
-}
index a77aeb3150b6967402cb53161fcb17673e549bb8..7bc17dfe3c7bf39913a0b3a1d2b0bf3c3d249d9d 100644 (file)
@@ -9,6 +9,8 @@
 
 
 #include "tweak-registration.hh"
+#include "grob.hh"
+#include "object-key-undumper.hh"
 
 LY_DEFINE(ly_clear_tweak_registry, "ly:tweak-clear-registry",
          0,0,0,(),