]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/font-metric.hh
cb9206efdcae1cbb3d8da6eb87d8231976871d72
[lilypond.git] / lily / include / font-metric.hh
1 /*   
2   font-metric.hh -- declare Font_metric
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef FONT_METRIC_HH
11 #define FONT_METRIC_HH
12
13 #include "box.hh"
14 #include "lily-guile.hh"
15 #include "smobs.hh"
16 #include "lily-proto.hh"
17 #include "string.hh"
18
19 struct Font_metric
20 {
21 public:
22   SCM description_;
23   String path_;
24   
25   virtual int count () const;
26   virtual Offset get_indexed_wxwy (int) const;
27   virtual Box get_indexed_char (int index) const;
28   virtual Box get_ascii_char (int ascii) const;
29   virtual Box text_dimension (String)  const;
30   virtual int name_to_index (String) const;
31
32   virtual Molecule find_by_name (String) const;
33   virtual Molecule get_indexed_char_molecule (int k) const;
34   virtual Molecule get_ascii_char_molecule (int k) const;  
35   
36   DECLARE_SMOBS (Font_metric,);
37 private:
38   Font_metric (Font_metric const&); // no copy.
39 protected:
40   virtual void derived_mark () const;
41
42   Font_metric ();
43 };
44
45 DECLARE_UNSMOB(Font_metric, metrics);
46
47 #endif /* FONT_METRIC_HH */