]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/new-markup-scheme.ly: oops. font-family=music
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 1 Jan 2005 19:46:55 +0000 (19:46 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 1 Jan 2005 19:46:55 +0000 (19:46 +0000)
-> font-encoding fetaMusic.

* lily/main.cc: put default to PS.

* lily/tfm.cc: idem.

* lily/afm.cc: idem.

* lily/include/modified-font-metric.hh (struct
Modified_font_metric): remove coding_scheme() method.

* input/mutopia/F.Schubert/morgenlied.ly: convert to utf8

* scripts/convert-ly.py (conv): crash on encountering \encoding.

* input/les-nereides.ly: convert to utf8

* lily/modified-font-metric.cc (text_dimension): idem.

* lily/parser.yy (TODO): idem.

* lily/include/lily-lexer.hh (class Lily_lexer): idem.

* lily/lexer.ll: remove encoding

* lily/font-metric.cc (design_size): design_size returns a
dimension now as well.

34 files changed:
ChangeLog
Documentation/user/changing-defaults.itely
Documentation/user/music-glossary.tely
input/les-nereides.ly
input/mutopia/F.Schubert/morgenlied.ly
input/regression/font-name.ly
input/regression/new-markup-scheme.ly
input/regression/new-markup-syntax.ly
input/test/ancient-font.ly
input/test/title-markup.ly
lily/afm.cc
lily/font-metric.cc
lily/font-select.cc
lily/include/afm.hh
lily/include/font-metric.hh
lily/include/lily-lexer.hh
lily/include/output-def.hh
lily/include/text-item.hh
lily/include/tfm.hh
lily/lexer.ll
lily/lily-lexer.cc
lily/main.cc
lily/modified-font-metric.cc
lily/pango-select.cc
lily/paper-def.cc
lily/parser.yy
lily/text-item.cc
lily/tfm.cc
mf/GNUmakefile
mf/parmesan-heads.mf
scm/framework-tex.scm
scm/output-tex.scm
scm/safe-lily.scm
scripts/convert-ly.py

index 111a47c5075dd9906b15c91e36879314f80b26a1..f19dcf21e7c712eb8ac6e1f973412b10f06788d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
 2005-01-01  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * input/regression/new-markup-scheme.ly: oops. font-family=music
+       -> font-encoding fetaMusic.  
+
+       * lily/main.cc: put default to PS.
+
+       * lily/tfm.cc: idem.
+
+       * lily/afm.cc: idem.
+
+       * lily/include/modified-font-metric.hh (struct
+       Modified_font_metric): remove coding_scheme() method.
+
+       * input/mutopia/F.Schubert/morgenlied.ly: convert to utf8
+
+       * scripts/convert-ly.py (conv): crash on encountering \encoding.
+
+       * input/les-nereides.ly: convert to utf8
+
+       * lily/modified-font-metric.cc (text_dimension): idem.
+
+       * lily/parser.yy (TODO): idem.
+
+       * lily/include/lily-lexer.hh (class Lily_lexer): idem.
+
+       * lily/lexer.ll: remove encoding
+
        * scm/framework-ps.scm (output-variables): separately scale the
        page to mm 
 
index e9f1e8ed5a9ed2653954f4f25b910b8fb6bc6994..1f275d1032a257b3438fcd996c17f1375344853f 100644 (file)
@@ -1537,6 +1537,9 @@ Syntax errors for markup mode are confusing.
 @node Text encoding
 @subsection Text encoding
 
+[FIXME: OBSOLETE, use UTF8 for input files.]
+
+
 Texts can be entered in different encodings.  The encoding of the
 file can be set with @code{\encoding}.
 
index 51e371af4f932ac7a5807e2f28c883b88cda9891..2a562f63dbb53675ef428d33255dff8b6cf666b8 100644 (file)
@@ -1898,7 +1898,6 @@ variants of the base chords.
 %\override Score.LyricText #'font-style = #'large
 %\override Score.TextScript #'font-style = #'large
 \oldaddlyrics
-\encoding "TeX"
 \context Voice \relative c'' {
   <g e c >1 < a f d > < b g e >
   <c a f > < d b g > < e c a > < f d b > }
index 72e2f8d08726e17bc0e43eba69bdba084309eca0..93debb6c31754269989718ef5395d26a1fc1c16f 100644 (file)
@@ -1,8 +1,7 @@
 \version "2.4.0"
-\encoding "latin1"
 \header {
     composer = "ARTHUR GRAY"
-    title = "LES NÉRÉIDES"
+    title = "LES NÉRÉIDES"
     subtitle = "THE NEREIDS"
     enteredby = "JCN"
     piece = "Allegretto scherzando"
index 2c9e8ebc824eaa3d781911c05b4ab3b8c864485b..58d36fe65bc11b47745a674719e9a9e2b4815a0a 100644 (file)
@@ -1,5 +1,5 @@
 \header {
-    title = "Sängers Morgenlied"
+    title = "Sängers Morgenlied"
     composer = "Franz Schubert (1797-1828)"
     date = "27. Februar 1815"
     source = "Edition Peters"
@@ -85,25 +85,25 @@ ignoreMelismaOff = \unset ignoreMelismata
 firstVerse = \lyricmode {
     \set stanza = "1."
     
-    Sü -- ßes Licht! Aus
+    Sü -- ßes Licht! Aus
     \ignoreMelisma
     gol --
     \ignoreMelismaOff
 
     de -- nen  Pfor -- ten brichst du __ \manuscriptBreak | 
-    sie -- gend durch __ die Nacht. Schö -- ner Tag, du __ bist er -- wacht. __ Mit ge -- |
+    sie -- gend durch __ die Nacht. Schö -- ner Tag, du __ bist er -- wacht. __ Mit ge -- |
     \manuscriptBreak
-    heim -- nis -- vol -- len Wor -- ten, in me -- lo -- di -- schen Ak -- kor -- den, grüß __ ich __ \manuscriptBreak |
-    dei -- ne Ro -- sen -- pracht, grüß __ ich __ dei -- ne Ro -- sen -- pracht. 
+    heim -- nis -- vol -- len Wor -- ten, in me -- lo -- di -- schen Ak -- kor -- den, grüß __ ich __ \manuscriptBreak |
+    dei -- ne Ro -- sen -- pracht, grüß __ ich __ dei -- ne Ro -- sen -- pracht. 
     }
 
 secondVerse = \lyricmode {
     \set stanza = "2."
     Ach, der Lie -- be sanf
     -- tes We -- hen schwellt mir |
-    das be -- weg -- te __ Herz, sanft, wie ein ge -- lieb -- ter Schmerz. __ Dürft ich | 
-    nur auf gold -- nen Hö -- hen mich im Mor -- gen -- duft er -- ge -- hen! Sehn -- sucht |
-    zieht mich him -- mel -- wärts, Sehn -- sucht zieht mich him -- mel -- wärts.
+    das be -- weg -- te __ Herz, sanft, wie ein ge -- lieb -- ter Schmerz. __ Dürft ich | 
+    nur auf gold -- nen Hö -- hen mich im Mor -- gen -- duft er -- ge -- hen! Sehn -- sucht |
+    zieht mich him -- mel -- wärts, Sehn -- sucht zieht mich him -- mel -- wärts.
     }
 
 pianoRH =  \relative c''' \repeat volta 2 {
index 657b5148f650555d7f97dd9d5e05cc834f993974..7783ec5366df979e3bcf29919c833edbdd4548a1 100644 (file)
@@ -6,6 +6,8 @@
 the appropriate object. This may include Postscript fonts that are
 available through (La)TeX.
 
+
+BROKEN by pango/fontconfig
 "
 
 
@@ -20,7 +22,9 @@ available through (La)TeX.
 
 \score {
      {
-       \override Staff.TimeSignature  #'font-name = #"cmr17"
+
+       %% FIXME. 
+%      \override Staff.TimeSignature  #'font-name = #"cmr17"
        \set Score.skipBars = ##t
 
        % use font-name putri8r for Utopia Italic :
index 814018e17cdc50b42df84495a683ac634ee5cb92..6a6dea24aa20991b03c454972083e254278b829d 100644 (file)
@@ -2,7 +2,9 @@
 \header {
 
     texidoc = "There is a Scheme macro @code{markup} to produce markup
-    texts using a similar syntax as @code{\\markup}."
+    texts using a similar syntax as @code{\\markup}.
+
+"
 
     }
 \version "2.5.2"
@@ -16,9 +18,8 @@
 
             \bracket \column { baz bazr bla }
             \hspace #2.0
-            \override #'(font-family . music) {
+            \override #'(font-encoding . fetaMusic) {
                 \lookup #"noteheads-0"
-                \char #53
             }
             \musicglyph #"accidentals.-1"
             \combine "X" "+"   
@@ -39,8 +40,8 @@
               #:override '(baseline-skip . 4) 
               #:bracket #:column ( "baz" "bazr" "bla" )
               #:hspace 2.0
-              #:override '(font-family . music) #:line (#:lookup "noteheads-0" 
-                                                        #:char 53)
+              #:override '(font-encoding . fetaMusic) #:line (#:lookup "noteheads-0" 
+                                                       )
               #:musicglyph "accidentals.-1"
               #:combine "X" "+"   
               #:combine "o" "/"
index 3c1dace16229618a2912201904ddad56286ace6a..f3936030308bcf7520bdc958f9b68b3175bb940e 100644 (file)
@@ -15,9 +15,8 @@ texidoc = "With the new markup syntax, text may be written in various manners."
 
                \bracket \column { baz bazr bla }
                \hspace #2.0
-               \override #'(font-family . music) {
+               \override #'(font-encoding . fetaMusic) {
                        \lookup #"noteheads-0"
-                       \char #53
                }
                \semiflat
 
index 16aae2dad23d08c7001159079158c77bba8797ce..5960389186616206a1365a33d11dcfc890418908 100644 (file)
@@ -100,7 +100,7 @@ upperStaff = \context GregorianStaff = "upperStaff" <<
 %      \break % 7 (8*1)
 
        ges! fes!
-       \clef "hufnagel.do.fa"
+       \clef "hufnagel-do-fa"
        \override NoteHead  #'style = #'hufnagel.punctum
        es! des! ces! des! es! fes!
        \bar "||"
index 0be842162e4a745bb63b7128872e757547f0f732..bbfc6447df5848b0f2f464dafc6327a8617cdfd7 100644 (file)
@@ -58,7 +58,6 @@ sizeTest = \markup {
        }
 }
 
-\encoding "latin1"
 
 spaceTest = \markup { "two space chars" }
 \header {
@@ -70,7 +69,7 @@ spaceTest = \markup { "two space chars" }
     % ugh: encoding char-size
     %dedication = "For my öòóôõø so dear Lily"
     dedication = \markup { "For my "
-                          "öòóôõø"
+%                         "öòóôõø"
                           " so dear Lily" }
     title = "Title"
     subtitle = "(and (the) subtitle)"
index 3c2d84f10537171bfe3b648b9ac4278f59fbff80..da4493b5a88d15f2774b3d814712421bf21413e3 100644 (file)
@@ -178,11 +178,7 @@ Adobe_font_metric::design_size () const
   return design_size_;    
 }
 
-String
-Adobe_font_metric::coding_scheme () const
-{
-  return font_info_->gfi->encodingScheme;
-}
+
 
 String
 Adobe_font_metric::font_name () const
index 415e2db6de1fa32feab8383adb7a3e3c51a4189e..4e7b9085373abf8a9155303f448c58ae4eb77e15 100644 (file)
@@ -28,11 +28,6 @@ Font_metric::design_size () const
   return 1.0 * point_constant;
 }
 
-String
-Font_metric::coding_scheme () const
-{
-  return "FontSpecific";
-}
 
 Stencil
 Font_metric::find_by_name (String s) const
@@ -310,19 +305,6 @@ Font_metric::get_indexed_char_stencil (int code) const
   return Stencil (b, at);
 }
 
-int
-/*Font_metric::*/
-get_encoded_index (Font_metric *m, String input_coding, int code)
-{
-  String font_coding = m->coding_scheme ();
-  if (font_coding == input_coding)
-    return code;
-  SCM s = scm_call_3 (ly_lily_module_constant ("encoded-index"),
-                     scm_makfrom0str (input_coding.to_str0 ()),
-                     scm_makfrom0str (font_coding.to_str0 ()),
-                     scm_int2num (code));
-  return scm_to_int (s);
-}
 
 Offset
 Font_metric::attachment_point (String) const
index 348544e3e42924236276b1df01c0cb4f0433e983..a92bf773d44e131de3de19c69f54bd2389fdbcfc 100644 (file)
@@ -50,8 +50,7 @@ wild_compare (SCM field_val, SCM val)
 
 Font_metric *
 get_font_by_design_size (Output_def *layout, Real requested,
-                        SCM font_vector,
-                        SCM font_encoding, SCM input_encoding)
+                        SCM font_vector)
 {
   int n = SCM_VECTOR_LENGTH (font_vector);
   Real size = 1e6;
@@ -82,18 +81,16 @@ get_font_by_design_size (Output_def *layout, Real requested,
 
   Font_metric *fm = unsmob_metrics (scm_force (SCM_VECTOR_REF (font_vector,
                                                               i)));
-  return find_scaled_font (layout, fm, requested / size,
-                          font_encoding, input_encoding);
+  return find_scaled_font (layout, fm, requested / size);
 }
 
 Font_metric *
 get_font_by_mag_step (Output_def *layout, Real requested_step,
-                     SCM font_vector, Real default_size,
-                     SCM font_encoding, SCM input_encoding)
+                     SCM font_vector, Real default_size)
 {
   return get_font_by_design_size (layout, default_size
                                  * pow (2.0, requested_step / 6.0),
-                                 font_vector, font_encoding, input_encoding);
+                                 font_vector);
 }
 
 SCM
@@ -103,7 +100,7 @@ properties_to_font_size_family (SCM fonts, SCM alist_chain)
 }
 
 Font_metric *
-select_encoded_font (Output_def *layout, SCM chain, SCM input_encoding)
+select_encoded_font (Output_def *layout, SCM chain)
 {
   SCM name = ly_chain_assoc (ly_symbol2scm ("font-name"), chain);
 
@@ -123,9 +120,7 @@ select_encoded_font (Output_def *layout, SCM chain, SCM input_encoding)
                   : 1);
       Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name));
                
-      SCM font_encoding
-       = scm_cdr (ly_chain_assoc (ly_symbol2scm ("font-encoding"), chain));
-      return find_scaled_font (layout, fm, rmag, font_encoding, input_encoding);
+      return find_scaled_font (layout, fm, rmag);
     }
   else if (scm_instance_p (name))
     {
@@ -137,12 +132,8 @@ select_encoded_font (Output_def *layout, SCM chain, SCM input_encoding)
       if (scm_is_pair (font_size))
        req = scm_to_double (scm_cdr (font_size));
 
-      SCM font_encoding
-       = scm_cdr (ly_chain_assoc (ly_symbol2scm ("font-encoding"), chain));
-
       return get_font_by_mag_step (layout, req, vec,
-                                  scm_to_double (base_size) * point_constant,
-                                  font_encoding, input_encoding);
+                                  scm_to_double (base_size) * point_constant);
     }
 
   assert (0);
@@ -152,5 +143,5 @@ select_encoded_font (Output_def *layout, SCM chain, SCM input_encoding)
 Font_metric *
 select_font (Output_def *layout, SCM chain)
 {
-  return select_encoded_font (layout, chain, SCM_EOL);
+  return select_encoded_font (layout, chain);
 }
index 2c94f98aa31003e423a53409956383f1356218dc..21305c2ad75e6d4ac9330bfdec5a04eb21a3124a 100644 (file)
@@ -32,7 +32,6 @@ public:
   virtual Box get_ascii_char (int) const;
   virtual Box get_indexed_char (int) const;
   virtual Offset get_indexed_wxwy (int) const;
-  virtual String coding_scheme () const;
   static SCM make_afm (AFM_Font_info*, unsigned, Real);
   virtual Real design_size () const;
   virtual String font_name () const; 
index 73a03daa7235e615fd135db76320be93cec05f16..8a8139e2c41f4ec2624eb25ed283c1c7ec682bc7 100644 (file)
@@ -36,7 +36,6 @@ public:
   virtual Stencil find_by_name (String) const;
   virtual Stencil get_indexed_char_stencil (int k) const;
   virtual Stencil get_ascii_char_stencil (int k) const;
-  virtual String coding_scheme () const;
   virtual SCM sub_fonts () const;
   virtual SCM font_file_name () const; 
   DECLARE_SMOBS (Font_metric,);
index cfdb891033693eff4430856bd0819124b3f29d30..e9f2d6d914aa08caa87c231fce39e4ed7afc3788 100644 (file)
@@ -24,7 +24,6 @@ class Lily_lexer : public Includable_lexer
   DECLARE_SMOBS(Lily_lexer,);
 public:
   SCM scopes_;
-  SCM encoding_;
   
 private:
   int lookup_keyword (String);
@@ -72,8 +71,6 @@ public:
   void push_note_state (SCM tab);
   void pop_state ();
   void LexerError (char const *);
-  void set_encoding (String);
-  SCM encoding () const;
   void set_identifier (SCM name_string, SCM);
   bool is_note_state () const;
   bool is_chord_state () const;
index 92a5f13996961e883546ffc3206ba6d1b57ce7bd..a3110eda5195e840c1c748be4e4d52d80b4138ad 100644 (file)
@@ -68,15 +68,14 @@ void set_tempo (Output_def*def, Moment moment, int count_per_minute_i);
 Interval line_dimensions_int (Output_def*def, int);
  
 
-Font_metric *select_encoded_font (Output_def *layout, SCM input_encoding, SCM chain);
+Font_metric *select_encoded_font (Output_def *layout, SCM chain);
 Font_metric *select_font (Output_def *layout, SCM chain);
 
 DECLARE_UNSMOB (Output_def, output_def);
 
 
 Font_metric *find_scaled_font (Output_def *od,
-                              Font_metric *f, Real magnification,
-                              SCM font_encoding, SCM input_encoding);
+                              Font_metric *f, Real magnification);
 Output_def *scale_output_def (Output_def *def, Real scale);
 Real output_scale (Output_def*);
 
index 97d91cf14e2fcb194451e89abb72e807ada75114..48207f9e656e271da6a9840408d086be4b117bd6 100644 (file)
@@ -18,7 +18,7 @@ class Text_interface
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
-  DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM, SCM));
+  DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM));
   static bool has_interface (Grob*);
   static bool markup_p (SCM) ;
 };
index 95d2dfa913b55436d584c7c9fb8f03ea5f37d956..7c37eb5326a5daee1c251997b839e6c138e8a038 100644 (file)
@@ -150,7 +150,6 @@ public:
   virtual int count () const;
   virtual Box get_ascii_char (int) const;
   virtual Real design_size () const;
-  virtual String coding_scheme () const;
   virtual void derived_mark () const;
   virtual int name_to_index (String) const;
   
index d0a2dc50f01a2285bde30c5b603e14357f2cf00d..b4049350e15da715d5b6031ff4b4b258c78e33d8 100644 (file)
@@ -101,7 +101,6 @@ SCM (* scm_parse_error_handler) (void *);
 %option warn
 
 %x chords
-%x encoding
 %x figures
 %x incl
 %x lyrics
@@ -164,21 +163,12 @@ HYPHEN            --
   }
 }
 
-<INITIAL,lyrics,figures,notes>\\encoding{WHITE}* {
-       yy_push_state (encoding);
-}
 <INITIAL,chords,lyrics,notes,figures>\\version{WHITE}* {
        yy_push_state (version);
 }
 <INITIAL,chords,lyrics,notes,figures>\\renameinput{WHITE}*     {
        yy_push_state (renameinput);
 }
-<encoding>\"[^"]*\"     {
-       String s (YYText () + 1);
-       s = s.left_string (s.index_last ('\"'));
-       set_encoding (s);
-       yy_pop_state ();
-}
 <version>\"[^"]*\"     { /* got the version number */
        String s (YYText () + 1);
        s = s.left_string (s.index_last ('\"'));
@@ -204,10 +194,6 @@ HYPHEN             --
                     scm_makfrom0str (s.to_str0 ()));
 
 }
-<encoding>.    {
-       LexerError (_ ("No quoted string found after \\encoding").to_str0 ());
-       yy_pop_state ();
-}
 <version>.     {
        LexerError (_ ("No quoted string found after \\version").to_str0 ());
        yy_pop_state ();
index df238ef784c9b92179c8788e837f82bb86a7f5f4..e7570dff8079059f90fffe9802a39c5ae44f7a14 100644 (file)
@@ -87,7 +87,6 @@ static Keyword_ent the_key_tab[] = {
 Lily_lexer::Lily_lexer (Sources *sources)
 {
   keytable_ = new Keyword_table (the_key_tab);
-  encoding_ = SCM_EOL;
   chordmodifier_tab_ = SCM_EOL;
   pitchname_tab_stack_ = SCM_EOL; 
   sources_ = sources;
@@ -106,7 +105,6 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src)
   : Includable_lexer ()
 {
   keytable_ = (src.keytable_) ? new Keyword_table (*src.keytable_) : 0;
-  encoding_ = src.encoding_;
   chordmodifier_tab_ = src.chordmodifier_tab_;
   pitchname_tab_stack_ = src.pitchname_tab_stack_;
   sources_ = src.sources_;
@@ -137,11 +135,6 @@ Lily_lexer::~Lily_lexer ()
   delete keytable_;
 }
 
-SCM
-Lily_lexer::encoding () const
-{
-  return encoding_ ;
-}
 
 
 void
@@ -274,15 +267,6 @@ Lily_lexer::prepare_for_next_token ()
   last_input_ = here_input ();
 }
 
-void
-Lily_lexer::set_encoding (String s)
-{
-  if (s.length ())
-    encoding_ = ly_symbol2scm (s.to_str0 ());
-  else
-    encoding_ = SCM_EOL;
-}
-
 #include "ly-smobs.icc"
 
 IMPLEMENT_SMOBS (Lily_lexer);
@@ -296,8 +280,7 @@ Lily_lexer::mark_smob (SCM s)
 
   scm_gc_mark (lexer->chordmodifier_tab_);
   scm_gc_mark (lexer->pitchname_tab_stack_);
-  scm_gc_mark (lexer->scopes_);
-  return lexer->encoding_;
+  return lexer->scopes_;
 }
 
 int
index 8cca9aa0e3281e14e818630243dcbd1efd16ec96..c75826be295876693e528ba9a7825fbfe4d542cf 100644 (file)
@@ -46,7 +46,7 @@ bool no_layout_global_b = false;
 /* Selected output format.
    One of tex, ps, scm, as.
 */
-String output_format_global = "tex";
+String output_format_global = "ps";
 
 /* Current output name. */
 String output_name_global;
index 1c854147fd43193fda05dae4c298a26f0922227a..67f30b3f4fd0c4447e6bf993b27e091bf514d832 100644 (file)
 #include "warn.hh"
 #include "stencil.hh"
 #include "lookup.hh"
+#include "main.hh"
 
 Modified_font_metric::Modified_font_metric (Font_metric *fm,
-                                           Real magnification,
-                                           String font_encoding,
-                                           String input_encoding)
+                                           Real magnification)
 {
-  input_encoding_ = input_encoding;
-  coding_vector_ = SCM_EOL;
-  coding_mapping_ = SCM_EOL;
-  coding_table_ = SCM_EOL;
-  coding_description_ = SCM_EOL;
   magnification_ = magnification;
   
   SCM desc = fm->description_;
@@ -33,76 +27,12 @@ Modified_font_metric::Modified_font_metric (Font_metric *fm,
   
   description_ = scm_cons (scm_car (desc), scm_make_real (total_mag));
   orig_ = fm;
-
-  String metric_coding = orig_->coding_scheme ();
-  if (metric_coding != "FontSpecific"
-      && metric_coding != font_encoding)
-    warning (_f ("conflicting metric coding (%s) and font_encoding (%s)",
-                metric_coding, font_encoding));
-
-  if (input_encoding_ != "" 
-      && input_encoding_ != "TeX"
-      && input_encoding_ != "ASCII"
-      && input_encoding_ !=  font_encoding)
-    {
-      coding_vector_ = scm_call_1 (ly_lily_module_constant ("get-coding-vector"),
-                                  scm_makfrom0str (font_encoding.to_str0 ()));
-
-      if (!ly_c_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_lily_module_constant ("get-coding-table"),
-                                 scm_makfrom0str (font_encoding.to_str0 ()));
-
-      coding_mapping_
-       = scm_call_2 (ly_lily_module_constant ("make-encoding-mapping"),
-                     coding_vector_,
-                     coding_table_);
-
-      coding_description_ = SCM_EOL;
-      coding_description_
-       = scm_acons (ly_symbol2scm ("input-name"),
-                    scm_makfrom0str (input_encoding_.to_str0 ()),
-                    coding_description_);
-      coding_description_
-       = scm_acons (ly_symbol2scm ("input-vector"),
-                    coding_vector_, coding_description_);
-      coding_description_
-       = scm_acons (ly_symbol2scm ("output-name"),
-                    scm_makfrom0str (orig_->coding_scheme ().to_str0 ()),
-                    coding_description_);
-      coding_description_
-       = scm_acons (ly_symbol2scm ("output-table"),
-                    coding_table_,
-                    coding_description_);
-      coding_description_
-       = scm_acons (ly_symbol2scm ("char-mapping"),
-                    coding_mapping_,
-                    coding_description_);
-    } 
 }
 
 SCM
-Modified_font_metric::make_scaled_font_metric (Font_metric *fm, Real scaling,
-                                              SCM font_encoding,
-                                              SCM input_encoding)
+Modified_font_metric::make_scaled_font_metric (Font_metric *fm, Real scaling)
 {
-  /*
-    UGH.
-   */
-  if (scm_is_symbol (input_encoding))
-    input_encoding = scm_symbol_to_string (input_encoding);
-  
-  String font_encoding_str = ly_symbol2string (font_encoding);
-  String input_encoding_str
-    = scm_is_string (input_encoding) ? ly_scm2string (input_encoding) : ""; 
-  
-  Modified_font_metric *sfm = new Modified_font_metric (fm, scaling,
-                                                       font_encoding_str,
-                                                       input_encoding_str);
+  Modified_font_metric *sfm = new Modified_font_metric (fm, scaling);
   return sfm->self_scm ();
 }
 
@@ -167,19 +97,9 @@ Modified_font_metric::index_to_ascii (int k) const
   return orig_->index_to_ascii (k);
 }
 
-String
-Modified_font_metric::coding_scheme () const
-{
-  return input_encoding_;
-}
-
 void
 Modified_font_metric::derived_mark () const
 {
-  scm_gc_mark (coding_vector_);
-  scm_gc_mark (coding_description_);
-  scm_gc_mark (coding_table_);
-  scm_gc_mark (coding_mapping_);
 }
 
 /* TODO: put this klutchness behind ly:option switch.  */  
@@ -266,64 +186,28 @@ Modified_font_metric::text_dimension (String text) const
       b.scale (magnification_); 
       return b;
     }
-  
-  if (input_encoding_ == "TeX")
-    b = tex_kludge (text);
-  else if (input_encoding_ == "ASCII"
-          || input_encoding_ == "" 
-          || input_encoding_ ==  orig_->coding_scheme ())
-    {
-      Interval ydims;
 
-      Real w = 0.0;
-
-      for (int i = 0; i < text.length (); i++) 
-       {
-         Box b = get_ascii_char ((unsigned char)text[i]);
-    
-         w += b[X_AXIS].length ();
-         ydims.unite (b[Y_AXIS]); 
-       }
-      if (ydims.is_empty ())
-       ydims = Interval (0, 0);
-
-      b = Box(Interval(0,w), ydims);
-    }
-  else
+  if (output_format_global == "tex")
     {
-      Interval ydims;
-      Real w = 0.0;
-
-      for (int i = 0; i < text.length (); i++) 
-       {
-         SCM sym = scm_vector_ref (coding_vector_,
-                                   scm_from_int((unsigned char) text[i]));
-
-         Box char_box;
-
-         if (!scm_is_symbol (sym))
-           continue;
-
-         char const *chars = scm_i_string_chars (scm_symbol_to_string (sym));
-         
-         int idx = orig_->name_to_index (chars);
-         if (idx >= 0)
-           char_box = orig_->get_indexed_char (idx);
-         
-         if (!char_box[X_AXIS].is_empty ())
-           /* length ? */
-           w += char_box[X_AXIS][RIGHT];
+      b = tex_kludge (text);
+      return b;
+    }
 
-         ydims.unite (char_box[Y_AXIS]);
-       }
+  Interval ydims;
 
-      if (ydims.is_empty ())
-       ydims = Interval (0, 0);
+  Real w = 0.0;
 
-      b = Box (Interval (0, w), ydims);
-      b.scale (magnification_);
+  for (int i = 0; i < text.length (); i++) 
+    {
+      Box b = get_ascii_char ((unsigned char)text[i]);
+    
+      w += b[X_AXIS].length ();
+      ydims.unite (b[Y_AXIS]); 
     }
-  
+  if (ydims.is_empty ())
+    ydims = Interval (0, 0);
+
+  b = Box(Interval(0,w), ydims);
   return b;
 }
 
@@ -333,32 +217,6 @@ Modified_font_metric::original_font () const
   return orig_;
 }
 
-
-LY_DEFINE (ly_font_encoding_alist, "ly:font-encoding-alist",
-          1, 0, 0,
-          (SCM font),
-          "Given the Modified_font_metric @var{font}, return an "
-          "alist.  Keys are input-name, input-vector, "
-          "output-name, output-table, mapping.")
-{
-  Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric*> (unsmob_metrics (font));
-  
-  SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "Modified_font_metric");
-  return fm->coding_description_;
-}
-
-LY_DEFINE (ly_font_encoding, "ly:font-encoding",
-          1, 0, 0,
-          (SCM font),
-          "Return encoding of @var{font}.")
-{
-  Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric*> (unsmob_metrics (font));
-  SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "Modified_font_metric");
-  return ly_symbol2scm (fm->original_font ()->coding_scheme ().to_str0 ());
-}
-
 SCM
 Modified_font_metric::sub_fonts () const
 {
index 402f7881464f677512184057523b740e0195fa29..c49c63cf37934a579004f55097555fc40e62004f 100644 (file)
@@ -49,9 +49,7 @@ select_pango_font (Output_def *layout, SCM chain)
   
   Font_metric * fm = all_fonts_global->find_pango_font (description);
 
-  return find_scaled_font (layout, fm, 1.0,
-                          ly_symbol2scm ("latin1"),
-                          ly_symbol2scm ("latin1")); 
+  return find_scaled_font (layout, fm, 1.0);
 }
 
 
index 83b3491da85bc80493f9072ac8ac176429054b4a..7b55761d84c3d7825d97c87de05eee1c3e9bcd13 100644 (file)
@@ -35,11 +35,10 @@ get_font_table (Output_def *def)
 
 /* TODO: should add nesting for Output_def here too. */
 Font_metric *
-find_scaled_font (Output_def *mod, Font_metric *f, Real m,
-                 SCM font_encoding, SCM input_encoding)
+find_scaled_font (Output_def *mod, Font_metric *f, Real m)
 {
   if (mod->parent_)
-    return find_scaled_font (mod->parent_, f, m, font_encoding, input_encoding);
+    return find_scaled_font (mod->parent_, f, m);
   
   Real lookup_mag = m / output_scale (mod);
 
@@ -56,10 +55,8 @@ find_scaled_font (Output_def *mod, Font_metric *f, Real m,
   else
     sizes = SCM_EOL;
   
-  SCM val = Modified_font_metric::make_scaled_font_metric (f, lookup_mag,
-                                                          font_encoding,
-                                                          input_encoding);
-
+  SCM val = Modified_font_metric::make_scaled_font_metric (f, lookup_mag);
+  
   sizes = scm_acons (scm_make_real (lookup_mag), val, sizes);
   scm_gc_unprotect_object (val);
   scm_hashq_set_x (font_table, f->self_scm (), sizes);
@@ -82,7 +79,7 @@ scale_output_def (Output_def *o, Real amount)
 LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
           1, 0, 0,
           (SCM bp),
-          "Return fonts scaled up BP")
+          "Return fonts from the @code{\\paper} block @var{bp}.")
 {
   Output_def *b = unsmob_output_def (bp);
 
index d9fa443eb72823fe4d1db5321d5705a4f6f787af..8df52ae600edfae4dcbedb734b1f75cf5afe4d1a 100644 (file)
@@ -116,12 +116,9 @@ get_first_context_id (SCM type, Music *m)
 }
 
 SCM
-make_simple_markup (SCM encoding, SCM a)
+make_simple_markup (SCM a)
 {
        SCM simple = ly_lily_module_constant ("simple-markup");
-       if (scm_is_symbol (encoding))
-               return scm_list_3 (ly_lily_module_constant ("encoded-simple-markup"),
-                          encoding, a);
        return scm_list_2 (simple, a);
 }
 
@@ -1968,7 +1965,7 @@ gen_text_def:
        | string {
                Music *t = MY_MAKE_MUSIC ("TextScriptEvent");
                t->set_property ("text",
-                       make_simple_markup (THIS->lexer_->encoding (), $1));
+                       make_simple_markup ($1));
                t->set_spot (THIS->here_input ());
                $$ = t;
        
@@ -2304,7 +2301,7 @@ lyric_element:
                $$ = $1;
        }
        | LYRICS_STRING {
-               $$ = make_simple_markup (THIS->lexer_->encoding (), $1);
+               $$ = make_simple_markup ($1);
        }
        ;
 
@@ -2547,7 +2544,7 @@ markup_head_1_list:
 
 simple_markup:
        STRING {
-               $$ = make_simple_markup (THIS->lexer_->encoding (), $1);
+               $$ = make_simple_markup ($1);
        }
        | MARKUP_IDENTIFIER {
                $$ = $1;
index 31274c804ad536876dcb77c2ba814017f0d4ec6b..9e32dba9590fab3975db997c0defc8b1ef7beb32 100644 (file)
 #include "ly-module.hh"
 
 
-MAKE_SCHEME_CALLBACK (Text_interface, interpret_string, 4)
+MAKE_SCHEME_CALLBACK (Text_interface, interpret_string, 3)
 SCM
 Text_interface::interpret_string (SCM layout_smob,
-                                 SCM props, SCM input_encoding, SCM markup)
+                                 SCM props,
+                                 SCM markup)
 {
   Output_def *layout = unsmob_output_def (layout_smob);
   
@@ -45,20 +46,7 @@ Text_interface::interpret_string (SCM layout_smob,
     }
 #endif
   
-  SCM_ASSERT_TYPE (input_encoding == SCM_EOL || scm_is_symbol (input_encoding),
-                  input_encoding, SCM_ARG2, __FUNCTION__, "symbol");
-
-  if (!scm_is_symbol (input_encoding))
-    {
-      SCM enc = layout->lookup_variable (ly_symbol2scm ("inputencoding"));
-      if (scm_is_string (enc))
-       input_encoding = scm_string_to_symbol (enc);
-      else if (scm_is_symbol (enc))
-       input_encoding = enc;
-    }
-  
-  Font_metric *fm = select_encoded_font (layout, props, input_encoding);
-
+  Font_metric *fm = select_encoded_font (layout, props);
   return fm->text_stencil (str).smobbed_copy();
 }
 
@@ -67,7 +55,7 @@ SCM
 Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
 {
   if (scm_is_string (markup))
-    return interpret_string (layout_smob, props, SCM_EOL, markup);
+    return interpret_string (layout_smob, props, markup);
   else if (scm_is_pair (markup))
     {
       SCM func = scm_car (markup);
index 815edd3ca1e83577609d1845e9ce2f9556845f02..29c16cd210741a94ed0f13c23fb0a2d80d895d35 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include "tfm.hh"
-
 #include "tfm-reader.hh"
 #include "string-convert.hh"
 #include "warn.hh"
@@ -17,8 +16,6 @@
 
 static Tex_font_char_metric dummy_static_char_metric;
 
-
-
 Tex_font_char_metric::Tex_font_char_metric ()
 {
   exists_ = false;
@@ -44,7 +41,6 @@ Tex_font_char_metric::dimensions () const
     }
   
   Real d = -depth_;
-
   Real point_constant = 1 PT;
   
   return Box (Interval (0, width_* point_constant ),
@@ -101,9 +97,6 @@ Tex_font_metric::make_tfm (String file_name)
   tfm->header_ = reader.header_;
   tfm->char_metrics_ = reader.char_metrics_;
   tfm->ascii_to_metric_idx_ = reader.ascii_to_metric_idx_;
-  tfm->encoding_table_
-    = scm_call_1 (ly_lily_module_constant ("get-coding-table"),
-                 scm_makfrom0str (tfm->coding_scheme ().to_str0 ()));
 
   return tfm->self_scm ();
 }
@@ -114,28 +107,8 @@ Tex_font_metric::design_size () const
   return info_.design_size * point_constant;
 }
 
-String
-Tex_font_metric::coding_scheme () const
-{
-  String scm = info_.coding_scheme;
-
-  for(int i = 0; i < scm.length (); i++)
-    if (scm[i] == ' ')
-      scm[i] = '-';
-
-  return scm;
-}
-
 int
 Tex_font_metric::name_to_index (String s) const
 {
-  SCM sym = ly_symbol2scm (s.to_str0 ());
-
-  SCM idx = scm_hash_ref (encoding_table_, sym, SCM_BOOL_F);
-  if (ly_c_char_p (idx))
-    {
-      return (unsigned char) ly_scm2char (idx);
-    }
-  else
-    return -1;  
+  assert (false);
 }
index fafc83cae7d2f36f27aabb77421fcf6ffad5441d..584c2de6808058cb79b40334b0e584728e3e3fa1 100644 (file)
@@ -59,7 +59,7 @@ foe:
 $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe
        (cd $(outdir) && fontforge -script $(notdir $<)) 
 
-$(outdir)/%.otf-table: $(outdir)/%.lisp
+$(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) 
        cat $< \
                $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
                $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@
index b8bc59c407f81ec93241842bd4bce4605fc5f567..65eb45160210dd49639c11238776b7a7327b9231 100644 (file)
@@ -314,7 +314,7 @@ def punctum_char (expr verbose_name, internal_name,
                  left_stem, right_stem, linea, cavum,
                  straight, auctum, direction_up, excentric, up_shift, down_shift, mag) =
 
-       fet_beginchar(verbose_name, internal_name)
+       fet_beginchar(verbose_name, "s" & internal_name)
                save b_h, a_w;
                a_b := 1.54; % b_h*a_b/a_w = wd/ht
                b_h := 0.85;
@@ -471,7 +471,7 @@ enddef;
 def inclinatum_char(expr verbose_name, internal_name,
                    small, stropha, auctum) =
 
-       fet_beginchar(verbose_name, internal_name)
+       fet_beginchar(verbose_name, "s"&internal_name)
                save ht, alpha;
                alpha# = 35;
                if small:
@@ -593,7 +593,7 @@ punctum_char("Ed. Vat. cephalicus", "vaticana.cephalicus",
             false, false, true, false, false, 1.0);
 
 % quilisma
-fet_beginchar("Ed. Vat. quilisma", "vaticana.quilisma")
+fet_beginchar("Ed. Vat. quilisma", "svaticana.quilisma")
        save b_h,a_w;
        a_b:=1.54; % b_h*a_b/a_w = wd/ht
        b_h:=0.85;
@@ -646,7 +646,7 @@ inclinatum_char("Solesmes stropha aucta", "solesmes.stropha.aucta",
                false, true, true);
 
 % solesmes oriscus
-fet_beginchar("Solesmes oriscus", "solesmes.oriscus")
+fet_beginchar("Solesmes oriscus", "ssolesmes.oriscus")
        save b_h, a_w;
        a_b := 1.54; % b_h*a_b/a_w = wd/ht
        b_h := 0.85;
@@ -683,7 +683,7 @@ fet_endchar;
 %
 
 % inclinatum
-fet_beginchar("Ed. Med. inclinatum", "medicaea.inclinatum")
+fet_beginchar("Ed. Med. inclinatum", "smedicaea.inclinatum")
        draw_diamond_head (1.2staff_space#, 0, 0, 35, false);
 fet_endchar;
 
@@ -691,7 +691,7 @@ fet_endchar;
 def punctum_char (expr verbose_name, internal_name,
        left_up_stem, left_down_stem) =
 
-       fet_beginchar(verbose_name, internal_name)
+       fet_beginchar(verbose_name, "s"&internal_name)
 
                save a, beta, ht, wd;
                ht# = 2 staff_space#;
@@ -752,7 +752,7 @@ punctum_char("Ed. Med. virga", "medicaea.virga",
 % parametrized punctum
 def punctum_char (expr verbose_name, internal_name,
        down_stem) =
-       fet_beginchar(verbose_name, internal_name)
+       fet_beginchar(verbose_name, "s" & internal_name)
                save alpha;
                alpha# = 55;
                draw_diamond_head (staff_space#, 0, 0, alpha#, false);
@@ -778,7 +778,7 @@ punctum_char("Hufnagel punctum", "hufnagel.punctum", false)
 punctum_char("Hufnagel virga", "hufnagel.virga",  true)
 
 % pes lower punctum
-fet_beginchar("Hufnagel pes lower punctum", "hufnagel.lpes")
+fet_beginchar("Hufnagel pes lower punctum", "shufnagel.lpes")
        save width, height, alpha;
        width# = 2*staff_space#;
        height# = 0.7*staff_space#;
index b5d91fe99c6d8c07b0c7f62b68bbed859c9ed7ad..cc1b4eaa3b9455b0cc028eee5951f987597a57a4 100644 (file)
             sub-fonts)))))
 
 (define (simple-font-load-command paper font)
-  (let* ((coding-alist (ly:font-encoding-alist font))
-        (font-encoding (assoc-get 'output-name coding-alist)))
-    (string-append
-     "\\font\\lilypond" (tex-font-command font) "="
-     (if (or (equal? (ly:font-encoding font) "cork-lm")
-            ;; FIXME: encoding: FontSpecific for cork-lm
-            (string-prefix? "lm" (ly:font-file-name font)))
-        "cork-" "")
-     (ly:font-file-name font)
-     " scaled "
-     (ly:number->string (inexact->exact
-                        (round (* 1000
-                                  (ly:font-magnification font)
-                                  (ly:paper-outputscale paper)))))
-     "\n"
-     "\\def\\" (tex-font-command font) "{%\n"
-     ;; UGH.  Should be handled via alist.
-     (if (or (equal? "Extended-TeX-Font-Encoding---Latin" font-encoding)
-            (not font-encoding))
-        "  \\lilypondfontencoding{T1}"
-        "  ")
-     "\\lilypond" (tex-font-command font)
-     "}%\n")))
+   (format
+    "\\font\\~a=~a scaled ~a%\n"
+    (tex-font-command font)
+    (ly:font-file-name font)
+    (inexact->exact
+     (round (* 1000
+              (ly:font-magnification font)
+              (ly:paper-outputscale paper))))))
 
 (define (font-load-command paper font)
   (if (pair? (ly:font-sub-fonts font))
index b0fc77e8d47e8330149ad95f5c3a78ba89195ea5..6bc3f50a06783ac2f2f40a040db78c561bba48c2 100644 (file)
   (embedded-ps (list 'round-filled-box  x y width height blotdiam)))
 
 (define (text font s)
-  ;; (assoc-get 'char-mapping (ly:font-encoding-alist font))))  
-  (let* ((mapping #f)
-
-        ;; TODO: we'd better do this for PS only
-        ;; LaTeX gets in the way, and we need to remap
-        ;; nonprintable chars.
-        
-        ;; (assoc-get 'input-name (ly:font-encoding-alist font)))
-        
-        (input-enc-name #f))
-
-    (string-append "\\hbox{\\" (tex-font-command font)
-                  (if (string? input-enc-name)
-                      (string-append "\\inputencoding{" input-enc-name "}")
-                      "{}")
-                  (sanitize-tex-string
-                   (if (vector? mapping)
-                       (reencode-string mapping s)
-                       s))
-                  "}")))
+  (format
+   "\\hbox{\\~a{}~a}" (tex-font-command font)
+   (sanitize-tex-string s)))
 
 (define (white-text scale s)
   (embedded-ps (list 'white-text scale s)))
            (string-append "\\special{src:"
                           (apply point-and-click location) "}")
            ""))
-      ""))
\ No newline at end of file
+      ""))
index 3ec1c8024f1457646345d87e0190ace38e9e14e0..98a7c385042397a3f004d91ccd9f92b975ecbe27 100644 (file)
@@ -35,7 +35,6 @@
      ly:export
      ly:font-get-glyph
      ly:font-design-size
-     ly:font-encoding-alist
      ly:font-file-name
      ly:font-magnification
      ly:font-metric?
index b7cc7b51f0ed70c6ec0db6b22ec9b47b8956f057..2384587e6f90b1b0d6a92c1e14fe2a48d33c8802 100644 (file)
@@ -2292,6 +2292,20 @@ def conv (str):
        str = re.sub ("'(vaticana|hufnagel|medicaea|petrucci|neomensural|mensural)-", r"'\1.", str) 
        return str
 
+conversions.append (((2, 5, 3),
+                    conv,
+                    'ly:find-glyph-by-name -> ly:font-get-glyph, remove - from glyphnames.'))
+
+
+
+def conv (str):
+       if re.search (r"\\encoding", str):
+               sys.stderr.write ("Sorry, input files should be UTF8.\n"
+                                 + "Please convert by hand.")
+               raise FatalConversionError()
+
+       return str
+
 conversions.append (((2, 5, 2),
                     conv,
                     'ly:find-glyph-by-name -> ly:font-get-glyph, remove - from glyphnames.'))