X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fttf.cc;h=2af774e414c254c402241b9a0a4524ba0f54cec7;hb=a8ac8a0a1d26f9555efb87a0d8328c14db48c48b;hp=eaeb67adfb25a46b9dfbd16858a4abd0d1e755b4;hpb=00216e16c717470ae53dbbfd1d52850d1b102e29;p=lilypond.git diff --git a/lily/ttf.cc b/lily/ttf.cc index eaeb67adfb..2af774e414 100644 --- a/lily/ttf.cc +++ b/lily/ttf.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2005--2012 Han-Wen Nienhuys + Copyright (C) 2005--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 @@ -20,7 +20,7 @@ #include #include "freetype.hh" -#include +#include FT_TRUETYPE_TABLES_H #include "international.hh" #include "memory-stream.hh" @@ -503,7 +503,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 +553,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 +570,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);