]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/font-metric.hh
release: 1.3.19
[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 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
17 struct Character_metric
18 {
19   virtual Box dimensions () const;
20   virtual ~Character_metric ();
21 };
22
23
24
25 struct Font_metric
26 {
27   Font_metric ();
28   SCM name_;
29   virtual SCM description () const;
30   virtual Character_metric const *get_char (int ascii, bool warn) const; 
31   virtual ~Font_metric ();
32   virtual Box text_dimension (String) const;
33
34   DECLARE_SMOBS;
35 private:
36   Font_metric (Font_metric const&); // no copy.
37 };
38
39
40 struct Scaled_font_metric : public Font_metric
41 {
42   Font_metric *orig_l_;
43   int magstep_i_;
44   
45   Scaled_font_metric (Font_metric*, int);
46   virtual SCM description () const;
47   virtual Box text_dimension (String) const;
48 };
49
50 Font_metric * unsmob_metrics (SCM s);
51
52
53 #endif /* FONT_METRIC_HH */
54