#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)
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
{
rewind (f);
AFM_Font_info *fi;
- int ok = AFM_parseFile (f, &fi, ~1);
+ int ok = AFM_parseFile (f, &fi, ~0);
if (ok)
{
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
{