]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/scaled-font-metric.hh
c5d9a3bf056e1c4c5e4600984c211a738ac5804e
[lilypond.git] / lily / include / scaled-font-metric.hh
1 /*   
2   scaled-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 SCALED_FONT_METRIC_HH
11 #define SCALED_FONT_METRIC_HH
12
13 #include "font-metric.hh"
14
15 /* Perhaps junk this, and move this to paper_def as interface? */
16 struct Modified_font_metric : public Font_metric
17 {
18 public:
19   Box text_dimension (String);
20   
21   
22   static SCM make_scaled_font_metric (SCM, Font_metric*, Real);
23   virtual int count () const;
24   virtual Offset get_indexed_wxwy (int) const;
25   virtual int name_to_index (String) const;
26   virtual String coding_scheme () const;
27
28
29 protected:
30   
31   SCM coding_vector_;
32   SCM coding_table_;
33   SCM coding_permutation_;
34   SCM coding_description_;
35   friend SCM ly_font_encoding(SCM);
36     
37   virtual Real design_size () const;
38   virtual void derived_mark () const; 
39   virtual Box get_indexed_char (int) const;
40   virtual int index_to_ascii (int) const;
41   virtual Box get_ascii_char (int) const;
42   Font_metric *orig_;
43   Real magnification_;
44   String coding_scheme_;
45
46   
47   Modified_font_metric (String, Font_metric*, Real);
48   Box tex_kludge (String) const;
49 };
50
51 #endif /* SCALED_FONT_METRIC_HH */