From: fred Date: Tue, 26 Mar 2002 23:24:33 +0000 (+0000) Subject: lilypond-1.3.71 X-Git-Tag: release/1.5.59~1492 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e730e06a2c04a2a9628098fe8bc769b19a07b591;p=lilypond.git lilypond-1.3.71 --- diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index f8e2c0cee1..9cff0e2b28 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) @@ -29,11 +33,19 @@ All_font_metrics::find_afm (String name) SCM sname = ly_symbol2scm (name.ch_C ()); if (!afm_p_dict_.elem_b (sname)) { - String path = name + ".afm"; - path = search_path_.find (path); + String path; if (path.empty_b ()) + { + char * p = kpse_find_file(name.ch_C(), kpse_afm_format, true); + if (p) + path = p; + } + + if (path.empty_b()) + path = search_path_.find (name + ".afm"); + if (path.empty_b()) return 0; - + if (verbose_global_b) progress_indication ("[" + path); Adobe_font_metric * afm_p = read_afm_file (path); @@ -76,10 +88,18 @@ All_font_metrics::find_tfm (String name) SCM sname = ly_symbol2scm (name.ch_C ()); if (!tfm_p_dict_.elem_b (sname)) { - String path = name + ".tfm"; - path = search_path_.find (path); - if (path.empty_b ()) + String path; + + if (path.empty_b()) + { + char * p = kpse_find_tfm(name.ch_C()); + path = p; + } + if (path.empty_b()) + path = search_path_.find (name + ".tfm"); + 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);