#ifndef T1REWRIT_HH #define T1REWRIT_HH #include #include #include class Type1MMRemover { public: Type1MMRemover(Efont::Type1Font *, const Vector &weight_vec, int, ErrorHandler *); ~Type1MMRemover(); Efont::CharstringProgram *program() const { return _font; } const Vector &weight_vector() const { return _weight_vector; } int nmasters() const { return _weight_vector.size(); } int precision() const { return _precision; } Efont::Type1Charstring *subr_prefix(int); Efont::Type1Charstring *subr_expander(int); void run(); private: Efont::Type1Font *_font; Vector _weight_vector; int _precision; int _nsubrs; Vector _subr_done; Vector _subr_prefix; Vector _must_expand_subr; Vector _hint_replacement_subr; bool _expand_all_subrs; ErrorHandler *_errh; }; class Type1SubrRemover { public: Type1SubrRemover(Efont::Type1Font *, ErrorHandler *); ~Type1SubrRemover(); Efont::CharstringProgram *program() const { return _font; } ErrorHandler *errh() const { return _errh; } int save_count() const { return _save_count; } bool run(int); private: Efont::Type1Font *_font; int _nsubrs; enum { REMOVABLE = -1, DEAD = -2 }; Vector _renumbering; Vector _cost; int _save_count; int _nonexist_count; ErrorHandler *_errh; }; #endif