2 font-metric.hh -- declare Font_metric
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #define FONT_METRIC_HH
13 #include "lily-proto.hh"
15 #include "virtual-methods.hh"
19 DECLARE_CLASSNAME(Font_metric);
25 virtual Stencil text_stencil (String) const;
26 virtual Box text_dimension (String) const;
27 virtual String font_name () const;
28 virtual int count () const;
29 virtual Offset attachment_point (String) const;
30 virtual Offset get_indexed_wxwy (int) const;
31 virtual Box get_indexed_char (int index) const;
32 virtual Box get_ascii_char (int ascii) const;
33 virtual int name_to_index (String) const;
34 virtual unsigned index_to_charcode (int) const;
35 virtual int index_to_ascii (int) const;
36 virtual Real design_size () const;
37 virtual Stencil find_by_name (String) const;
38 virtual Stencil get_indexed_char_stencil (int k) const;
39 virtual Stencil get_ascii_char_stencil (int k) const;
40 virtual SCM sub_fonts () const;
41 virtual SCM font_file_name () const;
42 DECLARE_SMOBS (Font_metric,);
45 /* No copying, no implicit copy constructor. */
46 Font_metric (Font_metric const &);
49 virtual void derived_mark () const;
54 int get_encoded_index (Font_metric *m, String input_coding, int code);
56 class Simple_font_metric : public Font_metric
58 DECLARE_CLASSNAME(Simple_font_metric);
62 DECLARE_UNSMOB (Font_metric, metrics);
64 Box lookup_tex_text_dimension (Font_metric *font, SCM text);
66 #endif /* FONT_METRIC_HH */