]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/tfm.hh
(An orchestral part): new
[lilypond.git] / lily / include / tfm.hh
index a1db42f6942827d79204929f7221029210da3278..47f79bcad998f6cb23cbc5c7d8d1c1e8698963c0 100644 (file)
@@ -3,13 +3,17 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c)  1999--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 
 
   revamped code from GNU Fontutils-0.6
 
  */
 
+/*
+  TODO: aren't there standard libs?  Ideally it is better to just link
+  to a C-library.  */
+
 #ifndef TFM_HH
 #define TFM_HH
 
@@ -125,16 +129,16 @@ struct Tfm_kern
   Real kern;
 };
 
-struct Tex_font_char_metric : Character_metric
+struct Tex_font_char_metric
 {
   bool exists_b_;
   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;
+  String to_string () const;
   Tex_font_char_metric ();
 
   Box dimensions () const; 
@@ -144,18 +148,20 @@ struct Tex_font_char_metric : Character_metric
 class Tex_font_metric : public Font_metric
 {
 public:
-  Tex_font_metric ();
+  static  SCM make_tfm (String filename);
 
-  void clear (int n);
-  Character_metric *get_char (int, bool) const;
-  Tex_font_char_metric const &find_ascii (int ascii, bool warn=true) const;
-  void read_file (String name);
-  String str () const;
+  virtual int count () const;
+  virtual Box get_char (int) const;
+  Tex_font_char_metric const *find_ascii (int ascii, bool warn=true) const;
 
+  String to_string () const;
+  
   Tfm_info info_;
   Tfm_header header_;
   Array<Tex_font_char_metric> char_metrics_;
   Array<int> ascii_to_metric_idx_;
+private:
+  Tex_font_metric ();
 };