]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/afm.cc
* scm/titling.scm (default-score-title): remove caps for piece.
[lilypond.git] / lily / afm.cc
index 2a84e60360b70b579a29459a39a9dea145054aa1..c92433bd1a079e968dd486be3bd4fbecdee70596 100644 (file)
@@ -12,7 +12,6 @@
 #include "warn.hh"
 #include "libc-extension.hh"
 #include "afm.hh"
-#include "stencil.hh"
 #include "dimensions.hh"
 
 Adobe_font_metric::Adobe_font_metric (AFM_Font_info *fi)
@@ -98,6 +97,12 @@ Adobe_font_metric::get_ascii_char (int code) const
   return b;
 }
 
+int
+Adobe_font_metric::index_to_ascii (int code) const
+{
+  return font_info_->cmi[code].code;
+}
+
 Box
 Adobe_font_metric::get_indexed_char (int code) const
 {
@@ -131,7 +136,7 @@ read_afm_file (String nm)
   rewind (f);
     
   AFM_Font_info *fi;
-  int ok = AFM_parseFile (f, &fi, ~1);
+  int ok = AFM_parseFile (f, &fi, ~0);
 
   if (ok)
     {
@@ -161,31 +166,6 @@ Adobe_font_metric::get_indexed_wxwy (int k) const
   return 1/1000.0 PT * Offset (mi->wx, mi->wy); 
 }
 
-/*
-  return a stencil, without fontification 
- */
-Stencil
-Adobe_font_metric::find_by_name (String s) const
-{
-  AFM_CharMetricInfo const *cm = find_char_metric (s);
-
-  if (!cm)
-    {
-      /* FIXME: Why don't we return empty? */
-      Stencil m;
-      m.set_empty (false);
-      return m;
-    }
-
-  SCM at = (scm_list_2 (ly_symbol2scm ("char"), scm_int2num (cm->code)));
-
-#if 0
-  at = fontify_atom ((Font_metric*) this, at);
-#endif  
-  Box b = afm_bbox_to_box (cm->charBBox);
-  return Stencil (b, at);
-}
-
 Real
 Adobe_font_metric::design_size () const
 {