X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fttf.cc;h=dedd83cd88909d755584bb1f4ebe3483158bd2dc;hb=0e91bb16e020081fbbecab38fb7a8ed1c1a761dd;hp=6a68f00c3d4697f9af9f39f65c3ea2c07e011ede;hpb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;p=lilypond.git diff --git a/lily/ttf.cc b/lily/ttf.cc index 6a68f00c3d..dedd83cd88 100644 --- a/lily/ttf.cc +++ b/lily/ttf.cc @@ -29,6 +29,9 @@ #include "main.hh" #include "open-type-font.hh" +using std::string; +using std::vector; + Index_to_charcode_map make_index_to_charcode_map (FT_Face face) { @@ -503,7 +506,7 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name", LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1); int i = 0; - if (idx != SCM_UNDEFINED) + if (!SCM_UNBNDP (idx)) { LY_ASSERT_TYPE (scm_is_integer, idx, 2); i = scm_to_int (idx); @@ -553,7 +556,7 @@ LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa", LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1); int i = 0; - if (idx != SCM_UNDEFINED) + if (!SCM_UNBNDP (idx)) { LY_ASSERT_TYPE (scm_is_integer, idx, 2); i = scm_to_int (idx); @@ -570,7 +573,7 @@ LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa", Memory_out_stream stream; create_type42_font (&stream, file_name, i); - SCM asscm = scm_from_locale_stringn (stream.get_string (), + SCM asscm = scm_from_latin1_stringn (stream.get_string (), stream.get_length ()); debug_output ("]", false);