]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-select.cc
Run `make grand-replace'.
[lilypond.git] / lily / font-select.cc
index 144c0dd0104f49e973b7fe4281af5c1c7a12fa7a..81ba1115ce453314ed5807d535afed55d8fac2c9 100644 (file)
@@ -3,10 +3,9 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2003--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2003--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
-#include <math.h>
 
 #include "dimensions.hh"
 #include "all-font-metrics.hh"
@@ -77,9 +76,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 = unsmob_metrics (scm_force (scm_c_vector_ref (font_vector, i)));
 
   return find_scaled_font (layout, fm, requested / size);
 }
@@ -96,7 +93,8 @@ get_font_by_mag_step (Output_def *layout, Real requested_step,
 SCM
 properties_to_font_size_family (SCM fonts, SCM alist_chain)
 {
-  return scm_call_2 (ly_lily_module_constant ("lookup-font"), fonts, alist_chain);
+  return scm_call_2 (ly_lily_module_constant ("lookup-font"), fonts,
+                    alist_chain);
 }
 
 Font_metric *
@@ -113,28 +111,17 @@ select_encoded_font (Output_def *layout, SCM chain)
 #if HAVE_PANGO_FT2
   if (scm_is_string (name)
       && is_pango_format_global)
-    {
-      return select_pango_font (layout, chain);
-    }
+    return select_pango_font (layout, chain);
   else
 #endif
-    if (scm_is_string (name))
-      {
-       Real rmag =
-         robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-magnification"), chain, SCM_BOOL_F),
-                            1.0);
-       Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name));
-
-       return find_scaled_font (layout, fm, rmag);
-      }
-    else if (scm_instance_p (name))
+    if (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"));
 
        Real req = robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-size"), chain, SCM_BOOL_F),
                                      0.0);
-       
+
        return get_font_by_mag_step (layout, req, vec,
                                     scm_to_double (base_size));
       }