]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/afm.hh
* lily/tie-column.cc (set_manual_tie_configuration): new function.
[lilypond.git] / lily / include / afm.hh
1
2 /*
3   afm.hh -- declare Adobe_font_metric
4
5   source file of the GNU LilyPond music typesetter
6
7   (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
9
10 #ifndef AFM_HH
11 #define AFM_HH
12
13 #include <map>
14 using namespace std;
15
16 #include "array.hh"
17 #include "font-metric.hh"
18 #include "parse-afm.hh"
19
20 class Adobe_font_metric : public Simple_font_metric
21 {
22 public:
23   AFM_Font_info *font_info_;
24   unsigned int checksum_;
25   Real design_size_;
26
27   ~Adobe_font_metric ();
28
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;
38
39 protected:
40   AFM_CharMetricInfo const *find_char_metric (String name) const;
41   AFM_CharMetricInfo const *find_ascii_metric (int) const;
42
43   Array<int> ascii_to_metric_idx_;
44   map<String, int> name_to_metric_dict_;
45
46   Adobe_font_metric (AFM_Font_info *);
47 };
48
49 SCM read_afm_file (String);
50 Box afm_bbox_to_box (AFM_BBox);
51
52 #endif /* AFM_HH */
53