X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpango-select.cc;h=bc97f787514a1b98b2d361f0ba597abe388dc158;hb=d060f0152577ccb01bfa3d4c50a3f91d676573ca;hp=3f654ff3243eda6ed909d77d9299b0026ceaa628;hpb=4ecdbd7d70ca7441be4dddd15ac01cc255bc2a35;p=lilypond.git diff --git a/lily/pango-select.cc b/lily/pango-select.cc index 3f654ff324..bc97f78751 100644 --- a/lily/pango-select.cc +++ b/lily/pango-select.cc @@ -3,10 +3,8 @@ source file of the GNU LilyPond music typesetter - (c) 2004--2005 Han-Wen Nienhuys + (c) 2004--2007 Han-Wen Nienhuys */ -#include -using namespace std; #include "dimensions.hh" #include "all-font-metrics.hh" @@ -21,8 +19,8 @@ properties_to_pango_description (SCM chain, Real text_size) PangoFontDescription *description = 0; if (scm_is_string (name)) { - String name_str = ly_scm2string (name); - description = pango_font_description_from_string (name_str.to_str0 ()); + string name_str = ly_scm2string (name); + description = pango_font_description_from_string (name_str.c_str ()); } else { @@ -45,8 +43,7 @@ properties_to_pango_description (SCM chain, Real text_size) 0.0); Real size = text_size * pow (2.0, step / 6.0); - pango_font_description_set_size (description, - gint (size * PANGO_SCALE)); + pango_font_description_set_size (description, gint (size * PANGO_SCALE)); return description; } @@ -59,9 +56,10 @@ select_pango_font (Output_def *layout, SCM chain) * layout->get_dimension (ly_symbol2scm ("text-font-size"))); char *str = pango_font_description_to_string (pfd); - SCM scm_str = scm_makfrom0str (str); + SCM scm_str = scm_from_locale_string (str); g_free (str); - + pango_font_description_free (pfd); + return find_pango_font (layout, scm_str, 1.0); } @@ -135,14 +133,14 @@ symbols_to_pango_font_description (SCM family, { PangoFontDescription *description = pango_font_description_new (); - String family_str = "roman"; + string family_str = "roman"; if (scm_is_symbol (family)) family_str = ly_symbol2string (family); else if (scm_is_string (family)) family_str = ly_scm2string (family); pango_font_description_set_family (description, - family_str.to_str0 ()); + family_str.c_str ()); pango_font_description_set_style (description, symbol_to_pango_style (style)); pango_font_description_set_variant (description,