]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-select.cc
Doc: LM - correct @example for Tweak Command
[lilypond.git] / lily / font-select.cc
index 3de5a2a454bb2c79b5af365eed7d8bae87d33cdc..b35a7935a5d54a1f30355f8c0773e07a7d6781d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2003--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2003--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ get_font_by_design_size (Output_def *layout, Real requested,
 
       if (scm_promise_p (entry) == SCM_BOOL_T)
         {
-          Font_metric *fm = unsmob_metrics (scm_force (entry));
+          Font_metric *fm = Font_metric::unsmob (scm_force (entry));
           size = fm->design_size ();
         }
 #if HAVE_PANGO_FT2
@@ -86,7 +86,7 @@ get_font_by_design_size (Output_def *layout, Real requested,
 #endif
     }
   else
-    fm = unsmob_metrics (scm_force (scm_c_vector_ref (font_vector, i)));
+    fm = Font_metric::unsmob (scm_force (scm_c_vector_ref (font_vector, i)));
 
   return find_scaled_font (layout, fm, requested / size);
 }
@@ -123,7 +123,7 @@ select_encoded_font (Output_def *layout, SCM chain)
     return select_pango_font (layout, chain);
   else
 #endif
-    if (scm_instance_p (name))
+    if (scm_is_true (scm_instance_p (name)))
       {
         SCM base_size = scm_slot_ref (name, ly_symbol2scm ("default-size"));
         SCM vec = scm_slot_ref (name, ly_symbol2scm ("size-vector"));