]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/font-metric.hh
Cleanup: remove Simple_font_metric, Font_metric::text_dimension
[lilypond.git] / lily / include / font-metric.hh
index f194dee35ebb1607ce4f88ce4a26c533e5b3a1c8..b9dc5c7891d29ad84cf083725dfd133a7bcb6ef9 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--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 1999--2008 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
@@ -28,11 +39,10 @@ public:
   SCM description_;
   string file_name_;
 
-  virtual Stencil text_stencil (string) const;
-  virtual Stencil word_stencil (string) const;
-
-  // ugh.
-  virtual Box text_dimension (string) const;
+  // Return stencil for given string. output_state may be modified to
+  // record the font.
+  virtual Stencil text_stencil (Output_def* output_state,
+                                string text, bool music) const;
 
   virtual string font_name () const;
   virtual size_t count () const;
@@ -69,12 +79,6 @@ protected:
 
 int get_encoded_index (Font_metric *m, string input_coding, int code);
 
-class Simple_font_metric : public Font_metric
-{
-  DECLARE_CLASSNAME(Simple_font_metric);
-public:
-};
-
 DECLARE_UNSMOB (Font_metric, metrics);
 
 char *pfb2pfa (Byte const *pfb, int length);