]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/font-metric.hh
10da37bb728f8f08bf25fc8da90e1e030b20c9fe
[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 filename_;
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   virtual Real design_size () const;
32   virtual Stencil find_by_name (String) const;
33   virtual Stencil get_indexed_char_stencil (int k) const;
34   virtual Stencil get_ascii_char_stencil (int k) const;
35   virtual String coding_scheme () const;
36   //static int get_encoded_index (Font_metric *m, String input_coding, int code);
37   
38   DECLARE_SMOBS (Font_metric,);
39
40 private:
41   /* No copying, no implicit copy constructor.  */
42   Font_metric (Font_metric const&);
43
44 protected:
45   virtual void derived_mark () const;
46
47   Font_metric ();
48 };
49
50 int get_encoded_index (Font_metric *m, String input_coding, int code);
51
52 struct Simple_font_metric : public Font_metric
53 {
54 public:
55   
56 };
57   
58
59 DECLARE_UNSMOB(Font_metric, metrics);
60
61 #endif /* FONT_METRIC_HH */