]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/font-metric.hh
2003 -> 2004
[lilypond.git] / lily / include / font-metric.hh
index 9db37fda4e8dbadc05ac993ee50b615e5299a760..cb9206efdcae1cbb3d8da6eb87d8231976871d72 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "box.hh"
 #include "lily-guile.hh"
 #include "smobs.hh"
-
+#include "lily-proto.hh"
+#include "string.hh"
 
 struct Font_metric
 {
-  Font_metric ();
-  SCM name_;
-  virtual SCM description () const;
-  virtual Box get_char (int ascii, bool warn) const;
-  virtual ~Font_metric ();
-  virtual Box text_dimension (String) const;
-
-  DECLARE_SMOBS;
+public:
+  SCM description_;
+  String path_;
+  
+  virtual int count () const;
+  virtual Offset get_indexed_wxwy (int) const;
+  virtual Box get_indexed_char (int index) const;
+  virtual Box get_ascii_char (int ascii) const;
+  virtual Box text_dimension (String)  const;
+  virtual int name_to_index (String) const;
+
+  virtual Molecule find_by_name (String) const;
+  virtual Molecule get_indexed_char_molecule (int k) const;
+  virtual Molecule get_ascii_char_molecule (int k) const;  
+  
+  DECLARE_SMOBS (Font_metric,);
 private:
   Font_metric (Font_metric const&); // no copy.
-};
+protected:
+  virtual void derived_mark () const;
 
-
-struct Scaled_font_metric : public Font_metric
-{
-  Font_metric *orig_l_;
-  int magstep_i_;
-  
-  Scaled_font_metric (Font_metric*, int);
-  virtual SCM description () const;
-  virtual Box text_dimension (String) const;
+  Font_metric ();
 };
 
-Font_metric * unsmob_metrics (SCM s);
-
+DECLARE_UNSMOB(Font_metric, metrics);
 
 #endif /* FONT_METRIC_HH */
-