]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/font-metric.hh
Update source file headers. Fixes using standard GNU package conventions.
[lilypond.git] / lily / include / font-metric.hh
index f5d036f972ea63fd6e01efa2bd053004ba40f231..efa3dbf9372c9114f34e32ff83c69f1793b0afa0 100644 (file)
@@ -1,9 +1,20 @@
 /*
-  font-metric.hh -- declare Font_metric
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 1999--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef FONT_METRIC_HH
 #include "lily-proto.hh"
 #include "smobs.hh"
 #include "virtual-methods.hh"
+#include "freetype.hh"
+
+#include <map>
+using namespace std;
+
+typedef map<FT_UInt, FT_ULong> Index_to_charcode_map;
 
 class Font_metric
 {
@@ -22,9 +39,12 @@ public:
   SCM description_;
   string file_name_;
 
+  virtual Stencil text_stencil (string, bool) const;
+  virtual Stencil word_stencil (string, bool) const;
 
-  virtual Stencil text_stencil (string) const;
+  // ugh.
   virtual Box text_dimension (string) const;
+
   virtual string font_name () const;
   virtual size_t count () const;
   virtual Offset attachment_point (string) const;
@@ -46,7 +66,7 @@ public:
   virtual Stencil get_ascii_char_stencil (size_t k) const;
   virtual SCM sub_fonts () const;
   virtual SCM font_file_name () const;
-  DECLARE_SMOBS (Font_metric,);
+  DECLARE_SMOBS (Font_metric);
 
 private:
   /* No copying, no implicit copy constructor.  */
@@ -68,6 +88,6 @@ public:
 
 DECLARE_UNSMOB (Font_metric, metrics);
 
-Box lookup_tex_text_dimension (Font_metric *font, SCM text);
+char *pfb2pfa (Byte const *pfb, int length);
 
 #endif /* FONT_METRIC_HH */