From f47a52d0c0b6f0f2bc39708528ba9cec4882aaa2 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 27 Dec 2004 23:40:11 +0000 Subject: [PATCH] * lily/modified-font-metric.cc (text_dimension): try lookup_tex_text_dimension() first. * lily/tfm.cc: new function ly:load-text-dimensions --- lily/tfm.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lily/tfm.cc b/lily/tfm.cc index db117d5c33..b0d1daaa71 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -27,9 +27,9 @@ lookup_tex_text_dimension (Font_metric *font, Box b; SCM limit = ly_scheme_function ("TEX_STRING_HASHLIMIT"); - String key_str = font->font_name (); + String key_str = ly_scm2string (font->font_file_name()); int hash_code = scm_to_int (scm_hash (text, limit)); - key_str += to_string (hash_code); + key_str = to_string (hash_code) + key_str; SCM val = scm_hash_ref (tex_dimension_hash_tab, scm_makfrom0str (key_str.to_str0 ()), @@ -42,7 +42,7 @@ lookup_tex_text_dimension (Font_metric *font, val = scm_cdr (val); b[Y_AXIS][UP] = scm_to_double (scm_car (val)); val = scm_cdr (val); - b[Y_AXIS][RIGHT] = scm_to_double (scm_car (val)); + b[Y_AXIS][DOWN] = scm_to_double (scm_car (val)); } return b; -- 2.39.2