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