]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/afm.hh
($(outdir)/%.pdf): add DVIPS_FLAGS. This will
[lilypond.git] / lily / include / afm.hh
index b62d34fa54143efe10a5168b3736fff380b5f714..14ab748e93d9c6ab03b1e54df26ff4ff5a639a7a 100644 (file)
@@ -4,17 +4,18 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998--2001 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"
 
@@ -22,20 +23,25 @@ struct Adobe_font_metric : Font_metric
 {
   AFM_Font_info * font_inf_;
 
-  virtual Box get_char (int) const;
-  AFM_CharMetricInfo const *find_char_metric (String name, bool warn=true) const;
-  AFM_CharMetricInfo const *find_ascii_metric (int, bool warn=true) const;  
+  virtual int name_to_index (String) const;
+  virtual int count () const;
+  virtual Box get_ascii_char (int) const;
+  virtual Box get_indexed_char (int) const;
+  virtual Offset get_indexed_wxwy (int) const;
+  
+  AFM_CharMetricInfo const *find_char_metric (String name) const;
+  AFM_CharMetricInfo const *find_ascii_metric (int) const;  
 
-  String str () const;
+  String to_string () const;
   ~Adobe_font_metric ();
   static SCM make_afm (AFM_Font_info*, unsigned);
 
   unsigned int checksum_;
 protected:
   Array<int> ascii_to_metric_idx_;
-  Dictionary<int> name_to_metric_dict_;
+  std::map<String,int> name_to_metric_dict_;
 
-  virtual Molecule find_by_name (String) const;
+  virtual Stencil find_by_name (String) const;
 
   Adobe_font_metric (AFM_Font_info*);
 };