3 afm.hh -- declare Adobe_font_metric
5 source file of the GNU LilyPond music typesetter
7 (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
17 #include "font-metric.hh"
18 #include "parse-afm.hh"
20 class Adobe_font_metric : public Simple_font_metric
23 AFM_Font_info *font_info_;
24 unsigned int checksum_;
27 ~Adobe_font_metric ();
29 virtual int name_to_index (String) const;
30 virtual int count () const;
31 virtual int index_to_ascii (int) const;
32 virtual Box get_ascii_char (int) const;
33 virtual Box get_indexed_char (int) const;
34 virtual Offset get_indexed_wxwy (int) const;
35 static SCM make_afm (AFM_Font_info*, unsigned, Real);
36 virtual Real design_size () const;
37 virtual String font_name () const;
40 AFM_CharMetricInfo const *find_char_metric (String name) const;
41 AFM_CharMetricInfo const *find_ascii_metric (int) const;
43 Array<int> ascii_to_metric_idx_;
44 std::map<String, int> name_to_metric_dict_;
46 Adobe_font_metric (AFM_Font_info*);
49 SCM read_afm_file (String);
50 Box afm_bbox_to_box (AFM_BBox);