X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fafm.cc;h=c92433bd1a079e968dd486be3bd4fbecdee70596;hb=413d846f72eed6628af377f9c0b11ccffdd12f79;hp=2a84e60360b70b579a29459a39a9dea145054aa1;hpb=349f599ad3c120db8c82e4d7139b0914f484ed19;p=lilypond.git diff --git a/lily/afm.cc b/lily/afm.cc index 2a84e60360..c92433bd1a 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -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 {