]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/afm.hh
*** empty log message ***
[lilypond.git] / lily / include / afm.hh
index 7220978207af5ba2cb3fad7c5818d4d8fcfdff22..ebf8b6afb6bc61bbad048b6dcd2d5285a13c51b5 100644 (file)
@@ -4,44 +4,52 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #ifndef AFM_HH
 #define AFM_HH
 
+#include <map>
+
 #include "string.hh"
 #include "box.hh"
 #include "array.hh"
-#include "dictionary.hh"
 #include "font-metric.hh"
 #include "parse-afm.hh"
 
-struct Adobe_font_metric : Font_metric
+class Adobe_font_metric : public Simple_font_metric
 {
-  AFM_Font_info * font_inf_;
-
-  Box get_char (int, Real mag =1.0) const;
-  AFM_CharMetricInfo const *find_char_metric (String name, bool warn=true) const;
-  AFM_CharMetricInfo const *find_ascii_metric (int, bool warn=true) const;  
+public:
+  AFM_Font_info *font_info_;
+  unsigned int checksum_;
+  Real design_size_;
 
-  String str () const;
   ~Adobe_font_metric ();
-  static SCM make_afm (AFM_Font_info*);
+
+  virtual int name_to_index (String) const;
+  virtual int count () const;
+  virtual int index_to_ascii (int) const;
+  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;
 
 protected:
-  Array<int> ascii_to_metric_idx_;
-  Dictionary<int> name_to_metric_dict_;
+  AFM_CharMetricInfo const *find_char_metric (String name) const;
+  AFM_CharMetricInfo const *find_ascii_metric (int) const;  
 
-  virtual Molecule find_by_name (String, Real mag = 1.0) const;
+  Array<int> ascii_to_metric_idx_;
+  std::map<String,int> name_to_metric_dict_;
 
   Adobe_font_metric (AFM_Font_info*);
 };
 
-SCM read_afm_file (String fn);
-Box afm_bbox_to_box (AFM_BBox bb);
+SCM read_afm_file (String);
+Box afm_bbox_to_box (AFM_BBox);
   
-
 #endif /* AFM_HH */