X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffont-select.cc;h=5045a8276ebf4c460ec10e7c4e714c1b5cc17d2b;hb=b872748c6aa8bb721ced458691b38ac2fac5dfc8;hp=6532a7c2869f6b259dbb0e52535a0e6c3e896042;hpb=40aac0ae57ee113faa860ba221d83d9e6312173e;p=lilypond.git diff --git a/lily/font-select.cc b/lily/font-select.cc index 6532a7c286..5045a8276e 100644 --- a/lily/font-select.cc +++ b/lily/font-select.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2003--2014 Han-Wen Nienhuys + Copyright (C) 2003--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ #include "warn.hh" #include "pango-font.hh" #include "main.hh" +#include "lily-imports.hh" Font_metric * get_font_by_design_size (Output_def *layout, Real requested, @@ -40,9 +41,9 @@ get_font_by_design_size (Output_def *layout, Real requested, { SCM entry = scm_c_vector_ref (font_vector, i); - if (scm_promise_p (entry) == SCM_BOOL_T) + if (to_boolean (scm_promise_p (entry))) { - Font_metric *fm = unsmob_metrics (scm_force (entry)); + Font_metric *fm = unsmob (scm_force (entry)); size = fm->design_size (); } #if HAVE_PANGO_FT2 @@ -86,7 +87,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 (scm_force (scm_c_vector_ref (font_vector, i))); return find_scaled_font (layout, fm, requested / size); } @@ -103,8 +104,7 @@ 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 Lily::lookup_font (fonts, alist_chain); } Font_metric *