]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/tfm.hh
*** empty log message ***
[lilypond.git] / lily / include / tfm.hh
index 098fbe3e912c36410fd29ba7409cfd8e86428e86..8dba46d3e52a7e0dd57a6f03296b5608bb55a7af 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2000 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1999--2005 Jan Nieuwenhuizen <janneke@gnu.org>
 
 
   revamped code from GNU Fontutils-0.6
@@ -17,9 +17,7 @@
 #ifndef TFM_HH
 #define TFM_HH
 
-#include "string.hh"
 #include "array.hh"
-#include "lily-proto.hh"
 #include "font-metric.hh"
 
 /* The type.  */
@@ -131,37 +129,43 @@ struct Tfm_kern
 
 struct Tex_font_char_metric
 {
-  bool exists_b_;
+  bool exists_;
   Char_code code_;
   Real width_, height_, depth_, italic_correction_;
   Fix width_fix_, height_fix_, depth_fix_, italic_correction_fix_;
-  Array<Tfm_kern> kern_arr_;
-  Array<Tfm_ligature> ligature_arr_;
+  Array<Tfm_kern> kerns_;
+  Array<Tfm_ligature> ligatures_;
 
-  String str () const;
   Tex_font_char_metric ();
 
   Box dimensions () const; 
 };
 
 
-class Tex_font_metric : public Font_metric
+class Tex_font_metric : public Simple_font_metric
 {
 public:
-  static  SCM make_tfm (String filename);
+  static SCM make_tfm (String file_name);
 
-  Box get_char (int, bool) const;
-  Tex_font_char_metric const *find_ascii (int ascii, bool warn=true) const;
+  virtual int count () const;
+  virtual Box get_ascii_char (int) const;
+  virtual Real design_size () const;
+  virtual void derived_mark () const;
+  virtual int name_to_index (String) const;
+  virtual String font_name () const;
 
-  String str () const;
-
-private:
-  Tex_font_metric ();
+  Tfm_info const &info () const;
   
+protected:
   Tfm_info info_;
   Tfm_header header_;
   Array<Tex_font_char_metric> char_metrics_;
   Array<int> ascii_to_metric_idx_;
+  SCM encoding_table_;
+  String font_name_;
+private:
+  Tex_font_char_metric const *find_ascii (int ascii, bool warn = true) const;
+  Tex_font_metric ();
 };