X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fttf.cc;h=2af774e414c254c402241b9a0a4524ba0f54cec7;hb=5ac40949b8276fccf442709efbddc58c35041442;hp=932f7a6c95050b42d375a5ef9171ddba184d52b8;hpb=f93e4199873c91ae32f0e84a610d14853dc379df;p=lilypond.git diff --git a/lily/ttf.cc b/lily/ttf.cc index 932f7a6c95..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--2011 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" @@ -467,7 +467,7 @@ print_trailer (void *out, } static void -create_type42_font (void *out, string name, int idx) +create_type42_font (void *out, const string &name, int idx) { FT_Face face; @@ -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); @@ -515,8 +515,7 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name", } string file_name = ly_scm2string (ttf_file_name); - if (be_verbose_global) - progress_indication ("\n[" + file_name); + debug_output ("\n[" + file_name, false); FT_Face face; @@ -538,8 +537,7 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name", SCM ps_name = scm_from_locale_string (ps_name_str0 ? ps_name_str0 : ""); FT_Done_Face (face); - if (be_verbose_global) - progress_indication ("]"); + debug_output ("]", false); return ps_name; } @@ -555,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); @@ -567,17 +565,15 @@ LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa", } string file_name = ly_scm2string (ttf_file_name); - if (be_verbose_global) - progress_indication ("\n[" + file_name); + debug_output ("[" + file_name); // Debug message should start on a new line 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 ()); - if (be_verbose_global) - progress_indication ("]"); + debug_output ("]", false); return asscm; }