3 afm.hh -- declare Adobe_font_metric
5 source file of the GNU LilyPond music typesetter
7 (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
19 #include "font-metric.hh"
20 #include "parse-afm.hh"
22 struct Adobe_font_metric : Font_metric
24 AFM_Font_info * font_inf_;
26 virtual int name_to_index (String) const;
27 virtual int count () const;
28 virtual Box get_ascii_char (int) const;
29 virtual Box get_indexed_char (int) const;
30 virtual Offset get_indexed_wxwy (int) const;
32 AFM_CharMetricInfo const *find_char_metric (String name) const;
33 AFM_CharMetricInfo const *find_ascii_metric (int) const;
35 String to_string () const;
36 ~Adobe_font_metric ();
37 static SCM make_afm (AFM_Font_info*, unsigned);
39 unsigned int checksum_;
41 Array<int> ascii_to_metric_idx_;
42 std::map<String,int> name_to_metric_dict_;
44 virtual Molecule find_by_name (String) const;
46 Adobe_font_metric (AFM_Font_info*);
49 SCM read_afm_file (String fn);
50 Box afm_bbox_to_box (AFM_BBox bb);