From: Han-Wen Nienhuys Date: Wed, 7 Apr 2004 12:20:34 +0000 (+0000) Subject: * scm/output-tex.scm (text): remove debugging code. X-Git-Tag: release/2.3.0~75 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a1ac6142347beea8db846898b777b0e67cf9f83f;p=lilypond.git * scm/output-tex.scm (text): remove debugging code. * lily/scaled-font-metric.cc (ly_font_encoding): return vector * buildscripts/mf-to-table.py (parse_logfile): read EncodingScheme from infile. * mf/feta-generic.mf: move fet_beginfont into generic code. use fetaMusic (without space) as encoding * mf/feta-autometric.mf: take encoding argument * lily/afm.cc (read_afm_file): bugfix, read global info too. * lily/my-lily-lexer.cc (set_identifier): remove gh_scm2newstr use. * scm/encoding.scm (read-encoding-file): use symbol for glyph name. --- diff --git a/ChangeLog b/ChangeLog index 61a79062f3..f45449c554 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2004-04-07 Han-Wen Nienhuys + + * scm/output-tex.scm (text): remove debugging code. + + * lily/scaled-font-metric.cc (ly_font_encoding): return vector + + * buildscripts/mf-to-table.py (parse_logfile): read EncodingScheme + from infile. + + * mf/feta-generic.mf: move fet_beginfont into generic code. + use fetaMusic (without space) as encoding + + * mf/feta-autometric.mf: take encoding argument + + * lily/afm.cc (read_afm_file): bugfix, read global info too. + + * lily/my-lily-lexer.cc (set_identifier): remove gh_scm2newstr + use. + + * scm/encoding.scm (read-encoding-file): use symbol for glyph + name. + 2004-04-07 Jan Nieuwenhuizen * input/test/title-markup.ly: Set inputencoding. diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index a28c745ae1..36e00febae 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -93,7 +93,6 @@ def parse_logfile (fn): tags.append ('Regular') name = tags[1:] global_info['DesignSize'] = string.atof (tags[4]) - global_info['FontName'] = string.join (name,'-') global_info['FullName'] = string.join (name,' ') global_info['FamilyName'] = string.join (name[1:-1], @@ -105,7 +104,7 @@ def parse_logfile (fn): global_info['FontBBox'] = '0 0 1000 1000' global_info['Ascender'] = '0' global_info['Descender'] = '0' - global_info['EncodingScheme'] = 'FontSpecific' + global_info['EncodingScheme'] = tags[5] return (global_info, charmetrics, deps) diff --git a/lily/afm.cc b/lily/afm.cc index ce93f58345..ab7e707811 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -137,7 +137,7 @@ read_afm_file (String nm) rewind (f); AFM_Font_info *fi; - int ok = AFM_parseFile (f, &fi, ~1); + int ok = AFM_parseFile (f, &fi, ~0); if (ok) { diff --git a/lily/include/scaled-font-metric.hh b/lily/include/scaled-font-metric.hh index 687da0196d..5abddcacd4 100644 --- a/lily/include/scaled-font-metric.hh +++ b/lily/include/scaled-font-metric.hh @@ -25,13 +25,15 @@ public: virtual int name_to_index (String) const; virtual String coding_scheme () const; - /*should be protected? - */ + +protected: + SCM coding_vector_; SCM coding_table_; SCM coding_permutation_; - -protected: + SCM coding_description_; + friend SCM ly_font_encoding(SCM); + virtual Real design_size () const; virtual void derived_mark (); virtual Box get_indexed_char (int) const; diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 941d150715..39ac514f05 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -177,10 +177,7 @@ My_lily_lexer::set_identifier (SCM name, SCM s) if (lookup_keyword (ly_scm2string (name)) >= 0) { - size_t sz; - char * str = gh_scm2newstr (name, &sz) ; - warning (_f ("Identifier name is a keyword: `%s'", str)); - free (str); + warning (_f ("Identifier name is a keyword: `%s'", SCM_STRING_CHARS (name))); } SCM sym = scm_string_to_symbol (name); diff --git a/lily/scaled-font-metric.cc b/lily/scaled-font-metric.cc index f46d22bb67..8910be1772 100644 --- a/lily/scaled-font-metric.cc +++ b/lily/scaled-font-metric.cc @@ -19,7 +19,7 @@ Modified_font_metric::Modified_font_metric (String coding, Font_metric* m, Real coding_vector_ = SCM_EOL; coding_permutation_ = SCM_EOL; coding_table_ = SCM_EOL; - + coding_permutation_ = SCM_EOL; coding_scheme_ = coding; magnification_ = magn; SCM desc = m->description_; @@ -29,6 +29,40 @@ Modified_font_metric::Modified_font_metric (String coding, Font_metric* m, Real description_ = gh_cons (ly_car (desc), gh_double2scm (total_mag)); orig_ = m; + + if (coding_scheme_ != "TeX" + && coding_scheme_ != "ASCII" + && coding_scheme_ != orig_->coding_scheme ()) + { + coding_vector_ = scm_call_1 (ly_scheme_function ("get-coding-vector"), + scm_makfrom0str (coding_scheme_.to_str0 ())); + + if (!gh_vector_p (coding_vector_)) + { + programming_error ("get-coding-vector should return vector"); + coding_vector_ = scm_c_make_vector (256, ly_symbol2scm (".notdef")); + } + + + coding_table_ = scm_call_1 (ly_scheme_function ("get-coding-table"), + scm_makfrom0str (orig_->coding_scheme ().to_str0 ())); + + coding_permutation_ = scm_call_2 (ly_scheme_function ("make-encoding-permutation"), + coding_vector_, + coding_table_); + + coding_description_= scm_list_5 (scm_makfrom0str (coding_scheme_.to_str0 ()), + coding_vector_, + scm_makfrom0str (orig_->coding_scheme ().to_str0 ()), + coding_table_, + coding_permutation_); + + /* + TODO: use alist + */ + coding_permutation_ = scm_vector (coding_description_); + } + } SCM @@ -99,6 +133,7 @@ void Modified_font_metric::derived_mark () { scm_gc_mark (coding_vector_); + scm_gc_mark (coding_description_); scm_gc_mark (coding_table_); scm_gc_mark (coding_permutation_); } @@ -192,28 +227,6 @@ Modified_font_metric::text_dimension (String text) } else { - if (!gh_vector_p (coding_vector_)) - { - coding_vector_ - = scm_call_1 (ly_scheme_function ("get-coding-vector"), - scm_makfrom0str (coding_scheme_.to_str0 ())); - - if (!gh_vector_p (coding_vector_)) - { - programming_error ("get-coding-vector should return vector"); - coding_vector_ = scm_c_make_vector (256, - ly_symbol2scm (".notdef")); - } - - coding_table_ - = scm_call_1 (ly_scheme_function ("get-coding-table"), - scm_makfrom0str (orig_->coding_scheme ().to_str0 ())); - - coding_permutation_ - = scm_call_2 (ly_scheme_function ("make-encoding-permutation"), - coding_vector_, coding_table_); - } - Interval ydims; Real w = 0.0; @@ -224,12 +237,10 @@ Modified_font_metric::text_dimension (String text) Box char_box; - if (!gh_symbol_p (sym) && !gh_string_p (sym)) + if (!gh_symbol_p (sym)) continue; - char const * chars = gh_symbol_p (sym) - ? SCM_SYMBOL_CHARS(sym) : SCM_STRING_CHARS(sym); - + char const * chars = SCM_SYMBOL_CHARS(sym); int idx = orig_->name_to_index (chars); if (idx >= 0) @@ -258,15 +269,14 @@ LY_DEFINE (ly_font_encoding, "ly:font-encoding", 1, 0, 0, (SCM font), "Given the Modified_font_metric @var{font}, return a " - "list containing (input-coding, output-coding, permutation).") + "vector containing (input-coding-name, input-coding, " + "output-coding-name, output-coding, permutation).") { Modified_font_metric *fm = dynamic_cast (unsmob_metrics (font)); SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "Modified_font_metric"); - return scm_list_3 (fm->coding_vector_, - fm->coding_table_, - fm->coding_permutation_); + return fm->coding_description_; } LY_DEFINE (ly_font_coding_name, "ly:font-coding-name", diff --git a/lily/tfm.cc b/lily/tfm.cc index 2e0bf25167..f5cb273494 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -125,7 +125,7 @@ Tex_font_metric::coding_scheme () const int Tex_font_metric::name_to_index (String s) const { - SCM sym = scm_makfrom0str (s.to_str0 ()); + SCM sym = ly_symbol2scm (s.to_str0 ()); SCM idx = scm_hash_ref (encoding_table_, sym, SCM_BOOL_F); if (gh_char_p (idx)) diff --git a/mf/feta-autometric.mf b/mf/feta-autometric.mf index a777939034..eaa80fc5aa 100644 --- a/mf/feta-autometric.mf +++ b/mf/feta-autometric.mf @@ -17,16 +17,16 @@ message "Do not worry about the @ signs in the output, they are not errors. "; message "******************************************************"; % font or database? -def fet_beginfont(expr name,size) = +def fet_beginfont(expr name,size,encod) = font_identifier:=name&decimal size; font_size size; - message "@{font@:GNU@:LilyPond@:"&name&"@:"&decimal size&"@}"; + font_coding_scheme encod; + message "@{font@:GNU@:LilyPond@:"&name&"@:"&decimal size&"@:"&encod&"@}"; message ""; enddef; -def fet_endfont(expr name) = - message "@{tnof@:"&name&"@}"; - message ""; +def fet_endfont = + message "@{tnof@}"; enddef; % group or table? diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index aafc1a690e..3d6f6b0370 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -8,8 +8,6 @@ staffsize# := 20 pt#; %% arbitrary. input feta-params; -font_coding_scheme "feta braces"; - def abc_encode_int (expr i) = if i > 0: @@ -22,7 +20,8 @@ enddef ; % we must let the design increase for each % font to make sure that mftrace doesn't jack up the resolution too highly % for the longer braces. -fet_beginfont("feta-braces-" &char(97 + font_count), (font_count + 1)* 15); +fet_beginfont("feta-braces-" &char(97 + font_count), (font_count + 1)* 15, + "fetaBraces"); mode_setup; diff --git a/mf/feta-din.mf b/mf/feta-din.mf index ca5029d286..5294f2df7d 100644 --- a/mf/feta-din.mf +++ b/mf/feta-din.mf @@ -25,7 +25,7 @@ font_normal_space horizontal_space#; define_pixels (staffspace, linethickness, stafflinethickness, ex, descender, ascender); -fet_beginfont("feta-din", design_size); +fet_beginfont("feta-din", design_size, "TeX text"); input feta-din-code; diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 767a83d194..99f02ed528 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -13,16 +13,17 @@ if test = -1: mode := smoke; fi +staffsize# := design_size * pt#; + mode_setup; -% input feta-macros; input feta-params; font_x_height staff_space#; -font_coding_scheme "feta music"; +fet_beginfont("feta", design_size, "fetaMusic"); if test = 0: input feta-eindelijk; input feta-toevallig; @@ -39,3 +40,6 @@ else: input feta-test-generic.mf; fi + +fet_endfont; + diff --git a/mf/feta-nummer.mf b/mf/feta-nummer.mf index 7b1778b15b..07106b6c1d 100644 --- a/mf/feta-nummer.mf +++ b/mf/feta-nummer.mf @@ -15,7 +15,7 @@ input feta-macros; %blot_diameter# = .4pt#; -fet_beginfont("feta-nummer", design_size); +fet_beginfont("feta-nummer", design_size, "fetaNumber"); mode_setup; height#:=designsize; @@ -23,7 +23,6 @@ space# := design_size/2; font_x_height height#; font_normal_space space#; -font_coding_scheme "feta number"; % diff --git a/mf/feta-test11.mf b/mf/feta-test11.mf index 1568c9d5aa..66917bb063 100644 --- a/mf/feta-test11.mf +++ b/mf/feta-test11.mf @@ -2,8 +2,7 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta-test", 11); -staffsize#:=11pt#; +design_size := 11; test:=1; % smoked cheese @@ -15,7 +14,5 @@ test:=1; input feta-generic; -fet_endfont("feta"); - end. diff --git a/mf/feta-test13.mf b/mf/feta-test13.mf index fc79ef990c..be8ebb8dae 100644 --- a/mf/feta-test13.mf +++ b/mf/feta-test13.mf @@ -2,8 +2,7 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta-test", 13); -staffsize#:=13pt#; +design_size := 13; test:=1; % smoked cheese @@ -15,7 +14,6 @@ test:=1; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta-test16.mf b/mf/feta-test16.mf index 3d2ed3cea2..8dd1f2da14 100644 --- a/mf/feta-test16.mf +++ b/mf/feta-test16.mf @@ -2,8 +2,7 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta-test", 16); -staffsize#:=16pt#; +design_size := 16; test:=1; % smoked cheese @@ -15,7 +14,6 @@ test:=1; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta-test20.mf b/mf/feta-test20.mf index 72f9a87758..5838201c5a 100644 --- a/mf/feta-test20.mf +++ b/mf/feta-test20.mf @@ -3,8 +3,7 @@ input feta-autometric; -fet_beginfont("feta-test", 20); -staffsize#:=20pt#; +design_size := 20; test:=1; % smoked cheese @@ -16,7 +15,6 @@ test:=1; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta-test23.mf b/mf/feta-test23.mf index e4656d6d26..8dc122b741 100644 --- a/mf/feta-test23.mf +++ b/mf/feta-test23.mf @@ -3,8 +3,7 @@ input feta-autometric; -fet_beginfont("feta-test", 23); -staffsize#:=23pt#; +design_size := 23; test:=1; % smoked cheese @@ -16,7 +15,6 @@ test:=1; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta-test26.mf b/mf/feta-test26.mf index 09f34025bd..748efb8760 100644 --- a/mf/feta-test26.mf +++ b/mf/feta-test26.mf @@ -2,8 +2,7 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta-test", 26); -staffsize#:=26pt#; +design_size := 26; test:=1; % smoked cheese @@ -15,7 +14,6 @@ test:=1; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta11.mf b/mf/feta11.mf index c0e87d7d8c..de5e4dfd7c 100644 --- a/mf/feta11.mf +++ b/mf/feta11.mf @@ -3,14 +3,12 @@ input feta-autometric; -fet_beginfont("feta", 11); -staffsize#:=11.22pt#; + +design_size:= 11.22; test:=0; input feta-generic; -fet_endfont("feta"); - end. diff --git a/mf/feta13.mf b/mf/feta13.mf index 1987d39750..66db45b0ef 100644 --- a/mf/feta13.mf +++ b/mf/feta13.mf @@ -2,14 +2,13 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta", 13); -staffsize#:=12.60pt#; + +design_size := 12.60; + test:=0; input feta-generic; -fet_endfont("feta"); - end. diff --git a/mf/feta14.mf b/mf/feta14.mf index cc8aa4a6fd..63b71fe2c6 100644 --- a/mf/feta14.mf +++ b/mf/feta14.mf @@ -3,14 +3,12 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta", 14); -staffsize#:=14.14pt#; +design_size := 14.14; test:=0; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta16.mf b/mf/feta16.mf index 30d7b0a2a2..251a5c60d3 100644 --- a/mf/feta16.mf +++ b/mf/feta16.mf @@ -2,14 +2,11 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta", 16); -staffsize#:=15.87pt#; +design_size := 15.87; test:=0; input feta-generic; -fet_endfont("feta"); - end. diff --git a/mf/feta18.mf b/mf/feta18.mf index 1fa053e169..4c1de34699 100644 --- a/mf/feta18.mf +++ b/mf/feta18.mf @@ -4,14 +4,12 @@ input feta-autometric; % todo change file name -fet_beginfont("feta", 18); -staffsize#:=17.82pt#; +design_size := 17.82; test:=0; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta20.mf b/mf/feta20.mf index 35190154ff..c49d776ffc 100644 --- a/mf/feta20.mf +++ b/mf/feta20.mf @@ -1,17 +1,15 @@ % feta20.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=20pt#; +design_size := 20; input feta-autometric; -fet_beginfont("feta", 20); % use feta-test for debugging. test := 0; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta23.mf b/mf/feta23.mf index 95962446ba..efb7af8e45 100644 --- a/mf/feta23.mf +++ b/mf/feta23.mf @@ -4,14 +4,12 @@ input feta-autometric; % todo change file name -fet_beginfont("feta", 22.5); -staffsize#:=22.45pt#; +design_size := 22.45; test:=0; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/feta26.mf b/mf/feta26.mf index ec85398e99..7df8ac277c 100644 --- a/mf/feta26.mf +++ b/mf/feta26.mf @@ -2,14 +2,12 @@ % part of LilyPond's pretty-but-neat music font input feta-autometric; -fet_beginfont("feta", 26); -staffsize#:=25.20pt#; +design_size := 25.20; test:=0; input feta-generic; -fet_endfont("feta"); end. diff --git a/mf/parmesan-generic.mf b/mf/parmesan-generic.mf index 3b9e69d13d..c0ba15b115 100644 --- a/mf/parmesan-generic.mf +++ b/mf/parmesan-generic.mf @@ -15,13 +15,15 @@ fi mode_setup; % +staffsize# := design_size * pt#; input feta-macros; input feta-params; + font_x_height staff_space#; -font_coding_scheme "parmesan music"; +fet_beginfont("parmesan", design_size, "parmesanMusic") if test = 0: input parmesan-rests; input parmesan-heads; @@ -31,7 +33,8 @@ if test = 0: input parmesan-flags; input parmesan-timesig; input parmesan-scripts; - else: fi +fet_endfont; + diff --git a/mf/parmesan11.mf b/mf/parmesan11.mf index d0877b022d..27ba341437 100644 --- a/mf/parmesan11.mf +++ b/mf/parmesan11.mf @@ -1,16 +1,13 @@ % parmesan11.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=11.22pt#; +design_size := 11.22; input feta-autometric; -fet_beginfont("parmesan", 11); test := 0; input parmesan-generic; -fet_endfont("parmesan"); - end. diff --git a/mf/parmesan13.mf b/mf/parmesan13.mf index 06878f2388..905da48d5d 100644 --- a/mf/parmesan13.mf +++ b/mf/parmesan13.mf @@ -1,16 +1,14 @@ % parmesan13.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=12.60pt#; +design_size := 12.60; input feta-autometric; -fet_beginfont("parmesan", 13); test := 0; input parmesan-generic; -fet_endfont("parmesan"); end. diff --git a/mf/parmesan14.mf b/mf/parmesan14.mf index 2e78a737d2..a66c841265 100644 --- a/mf/parmesan14.mf +++ b/mf/parmesan14.mf @@ -1,16 +1,14 @@ % parmesan13.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=14.14pt#; +design_size := 14.14; input feta-autometric; -fet_beginfont("parmesan", 14); test := 0; input parmesan-generic; -fet_endfont("parmesan"); end. diff --git a/mf/parmesan16.mf b/mf/parmesan16.mf index 0b6f322022..19b0516779 100644 --- a/mf/parmesan16.mf +++ b/mf/parmesan16.mf @@ -1,16 +1,14 @@ % parmesan16.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=15.87pt#; +design_size := 15.87; input feta-autometric; -fet_beginfont("parmesan", 16); test := 0; input parmesan-generic; -fet_endfont("parmesan"); end. diff --git a/mf/parmesan18.mf b/mf/parmesan18.mf index dc87d6eb72..25238727d3 100644 --- a/mf/parmesan18.mf +++ b/mf/parmesan18.mf @@ -1,16 +1,14 @@ % parmesan13.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=17.82pt#; +design_size := 17.82; input feta-autometric; -fet_beginfont("parmesan", 18); test := 0; input parmesan-generic; -fet_endfont("parmesan"); end. diff --git a/mf/parmesan20.mf b/mf/parmesan20.mf index 8cda6b2a3a..d14251edce 100644 --- a/mf/parmesan20.mf +++ b/mf/parmesan20.mf @@ -1,16 +1,14 @@ % parmesan20.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=20pt#; +design_size := 20; input feta-autometric; -fet_beginfont("parmesan", 20); test := 0; input parmesan-generic; -fet_endfont("parmesan"); end. diff --git a/mf/parmesan23.mf b/mf/parmesan23.mf index 4ab3732714..39b643732b 100644 --- a/mf/parmesan23.mf +++ b/mf/parmesan23.mf @@ -1,16 +1,14 @@ % parmesan23.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=22.45pt#; +design_size := 22.45; input feta-autometric; -fet_beginfont("parmesan", 23); test := 0; input parmesan-generic; -fet_endfont("parmesan"); end. diff --git a/mf/parmesan26.mf b/mf/parmesan26.mf index 3b86b2232d..1be6fb5191 100644 --- a/mf/parmesan26.mf +++ b/mf/parmesan26.mf @@ -1,16 +1,14 @@ % parmesan26.mf % part of LilyPond's pretty-but-neat music font -staffsize#:=25.20pt#; +design_size := 25.20; input feta-autometric; -fet_beginfont("parmesan", 26); test := 0; input parmesan-generic; -fet_endfont("parmesan"); end. diff --git a/scm/encoding.scm b/scm/encoding.scm index 870abe3a42..c4d54b3660 100644 --- a/scm/encoding.scm +++ b/scm/encoding.scm @@ -92,10 +92,10 @@ vector of symbols." ("latin1" . "cork.enc") ;; LilyPond. - ("feta braces" . "feta-braces-a.enc") - ("feta number" . "feta-nummer10.enc") - ("feta music" . "feta20.enc") - ("parmesan music" . "parmesan20.enc")) + ("fetaBraces" . "feta-braces-a.enc") + ("fetaNumber" . "feta-nummer10.enc") + ("fetaMusic" . "feta20.enc") + ("parmesanMusic" . "parmesan20.enc")) )) (define (get-coding coding-name) diff --git a/scm/output-tex.scm b/scm/output-tex.scm index a9255fb561..e42dcc636c 100644 --- a/scm/output-tex.scm +++ b/scm/output-tex.scm @@ -311,32 +311,16 @@ (embedded-ps (list 'round-filled-box x y width height blotdiam))) (define (text font s) - (let* ((encoding (ly:font-encoding font)) - (names (car encoding)) - (table (cadr encoding)) - (permutation (caddr encoding))) - (if (ly:get-option 'verbose) - (begin - (format (current-error-port) "TEXT: ~S\n" s) - ;;(format (current-error-port) "encoding: ~S\n" encoding) - ;;(format (current-error-port) "table: ~S\n" table) - ;;(format (current-error-port) "permutation: ~S\n" permutation) - (map (lambda (x) - (let ((name (vector-ref names x))) - (format - (current-error-port) - "number:~S\nname:~S\ntable:~S\npermutation:~S\npnum:~S\n\n" - x name - (hash-ref table x) - (vector-ref permutation x) - (char->integer (vector-ref permutation x))))) - (map char->integer (plain-string->list s))))) + (let* + ((perm (vector-ref (ly:font-encoding font) 4))) - (string-append - "\\hbox{\\" (font-command font) "{}" - (output-tex-string (if (vector? permutation) - (reencode-string permutation s) s)) - "}"))) + (string-append "\\hbox{\\" (font-command font) "{}" + (output-tex-string + (if (vector? perm) + (reencode-string perm s) + s)) + "}"))) + (define (tuplet ht gapx dx dy thick dir) (embedded-ps (list 'tuplet ht gapx dx dy thick dir)))