From cb788160bb99e5c6d1e28ba9dd3be955b2a99edc Mon Sep 17 00:00:00 2001 From: Carsten Block Date: Wed, 5 Jul 2000 17:34:17 +0200 Subject: [PATCH] patch::: 1.3.69.cb1 --- VERSION | 2 +- lily/all-font-metrics.cc | 18 +++++++++++++++--- lily/main.cc | 9 +++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 9c8701a77f..45f7a19dcf 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=69 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=cb1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index f8e2c0cee1..f014ef3e46 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -16,6 +16,10 @@ #include "lily-guile.hh" #include "tfm-reader.hh" +extern "C" { +#include +} + const char * default_font_sz_ = "cmr10"; All_font_metrics::All_font_metrics (String path) @@ -32,8 +36,11 @@ All_font_metrics::find_afm (String name) String path = name + ".afm"; path = search_path_.find (path); if (path.empty_b ()) - return 0; - + { + path = kpse_find_file(name.ch_C(), kpse_afm_format, true); + if (path.empty_b()) + return 0; + } if (verbose_global_b) progress_indication ("[" + path); Adobe_font_metric * afm_p = read_afm_file (path); @@ -78,8 +85,13 @@ All_font_metrics::find_tfm (String name) { String path = name + ".tfm"; path = search_path_.find (path); + path = search_path_.find (path); if (path.empty_b ()) - return 0; + { + path = kpse_find_tfm(name.ch_C()); + if (path.empty_b()) + return 0; + } if (verbose_global_b) progress_indication ("[" + path); Tex_font_metric * tfm_p = Tex_font_metric_reader::read_file (path); diff --git a/lily/main.cc b/lily/main.cc index d575245570..fe92bbafa3 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -33,6 +33,9 @@ #include #endif +extern "C" { +#include +} bool verbose_global_b = false; bool no_paper_global_b = false; @@ -309,6 +312,12 @@ main (int argc, char **argv) setenv ("GUILE_INIT_SEGMENT_SIZE_1", "4194304", 0); setenv ("GUILE_MAX_SEGMENT_SIZE", "8388608", 0); + /* + initialize kpathsea + */ + kpse_set_program_name(argv[0], NULL); + kpse_maketex_option("tfm", TRUE); + oparser_global_p = new Getopt_long(argc, argv,theopts); while (Long_option_init const * opt = (*oparser_global_p)()) { -- 2.39.5