From 2081f1ec5cec9babbfc1833b876644196cea63d3 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 29 Dec 2004 11:34:11 +0000 Subject: [PATCH] new file. (try_load_text_metrics): new function --- ChangeLog | 12 ++++++++++++ lily/text-metrics.cc | 5 +++-- lily/tweak-registration.cc | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75225d78be..49a40f4bd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-12-29 Han-Wen Nienhuys + + * scm/framework-texstr.scm (header): change extension to .textmetrics + + * lily/lily-parser.cc (parse_file): do try_load_text_metrics for + -f tex. + + * lily/text-metrics.cc: new file. + (try_load_text_metrics): new function + + * lily/include/text-metrics.hh: new file. + 2004-12-28 Han-Wen Nienhuys * lily/include/lily-guile.hh (ly_lily_module_constant): rename diff --git a/lily/text-metrics.cc b/lily/text-metrics.cc index 919401f61f..c987579e40 100644 --- a/lily/text-metrics.cc +++ b/lily/text-metrics.cc @@ -9,6 +9,7 @@ #include "dimensions.hh" #include "font-metric.hh" #include "main.hh" +#include "file-path.hh" static SCM text_dimension_hash_tab; @@ -77,10 +78,10 @@ LY_DEFINE(ly_load_text_dimensions, "ly:load-text-dimensions", void try_load_text_metrics (String basename) { - String path = global_path.find_file (basename + ".textmetrics"); + String path = global_path.find (basename + ".textmetrics"); if (path != "") { - String contents (gulp_file_to_string (path)); + String contents (gulp_file_to_string (path, true)); contents = "(quote (" + contents + "))"; SCM lst = scm_c_eval_string (contents.to_str0 ()); diff --git a/lily/tweak-registration.cc b/lily/tweak-registration.cc index 701eb08dcc..d0739a2202 100644 --- a/lily/tweak-registration.cc +++ b/lily/tweak-registration.cc @@ -116,6 +116,7 @@ Tweak_registry::mark_smob (SCM smob) int Tweak_registry::print_smob (SCM smob, SCM port, scm_print_state*) { + (void) smob; // smother warning. scm_puts ("#", port); return 1; } -- 2.39.5