]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/modified-font-metric.hh
* lily/include/pango-font.hh: new file.
[lilypond.git] / lily / include / modified-font-metric.hh
1 /*   
2   modified-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 #ifndef MODIFIED_FONT_METRIC_HH
10 #define MODIFIED_FONT_METRIC_HH
11
12 #include "font-metric.hh"
13
14 /* Perhaps junk this, and move this to layout_def as interface? */
15 struct Modified_font_metric : public Font_metric
16 {
17 public:
18   virtual Box text_dimension (String) const;
19   virtual Stencil text_stencil (String) const;
20   
21   static SCM make_scaled_font_metric (Font_metric *fm, Real magnification,
22                                       SCM font_encoding, SCM input_encoding);
23   virtual int count () const;
24   virtual Offset get_indexed_wxwy (int) const;
25   virtual Offset attachment_point (String) const;
26   virtual int name_to_index (String) const;
27   virtual unsigned index_to_charcode (int) const;
28   virtual String coding_scheme () const;
29   virtual Font_metric *original_font () const;  
30   
31 protected:
32   SCM coding_vector_;
33   SCM coding_table_;
34   SCM coding_mapping_;
35   SCM coding_description_;
36   Font_metric *orig_;
37   Real magnification_;
38   String input_encoding_;
39   friend SCM ly_font_encoding_alist (SCM);
40     
41   Modified_font_metric (Font_metric *fm, Real magnification,
42                         String font_encoding, String input_encoding);
43   virtual SCM sub_fonts () const;
44   virtual String font_name () const;
45   virtual Real design_size () const;
46   virtual void derived_mark () const; 
47   virtual Box get_indexed_char (int) const;
48   virtual int index_to_ascii (int) const;
49   virtual Box get_ascii_char (int) const;
50   Box tex_kludge (String) const;
51 };
52
53 #endif /* MODIFIED_FONT_METRIC_HH */