rem: static int messaged = 0; if (!messaged) { _errh->warning("complex flex hint replaced with curves\n(This Type 2 format font contains flex hints that\nType 1 prohibits.)"); messaged = 1;
add: if (!_flex_message) { _errh->lwarning(landmark(), "complex flex hint replaced with curves"); _errh->message("(This Type 2 format font contains flex hints prohibited by Type 1.\nI've safely replaced them with ordinary curves.)"); _flex_message = 1;
context: MakeType1CharstringInterp::act_flex(int cmd, const Point &p0, const Point &p1, const Point &p2, const Point &p3_4, const Point &p5, const Point &p6, const Point &p7, double flex_depth){    if (_state == S_INITIAL)	gen_sbw(false);    _csgen.gen_moveto(p0, _state == S_OPEN);    _state = S_OPEN;    // 1. Outer endpoints must have same x (or y) coordinate    bool v_ok = (p0.x == p7.x);    bool h_ok = (p0.y == p7.y);        // 2. Join point and its neighboring controls must be at an extreme    if (v_ok && p2.x == p3_4.x && p3_4.x == p5.x) {	double distance = fabs(p3_4.x - p0.x);	int sign = (p3_4.x < p0.x ? -1 : 1);	if (sign * (p1.x - p0.x) < 0 || sign * (p1.x - p0.x) > distance	    || sign * (p6.x - p0.x) < 0 || sign * (p6.x - p0.x) > distance)	    v_ok = false;    } else	v_ok = false;    if (h_ok && p2.y == p3_4.y && p3_4.y == p5.y) {	double distance = fabs(p3_4.y - p0.y);	int sign = (p3_4.y < p0.y ? -1 : 1);	if (sign * (p1.y - p0.y) < 0 || sign * (p1.y - p0.y) > distance	    || sign * (p6.y - p0.y) < 0 || sign * (p6.y - p0.y) > distance)	    h_ok = false;    } else	h_ok = false;    // 3. Flex height <= 20    if (v_ok && fabs(p3_4.x - p0.x) > 20)	v_ok = false;    if (h_ok && fabs(p3_4.y - p0.y) > 20)	h_ok = false;    // generate flex commands    if (v_ok || h_ok) {	Point p_reference = (h_ok ? Point(p3_4.x, p0.y) : Point(p0.x, p3_4.y));	_csgen.gen_number(1);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_moveto(p_reference, false);	_csgen.gen_number(2);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_moveto(p1, false);	_csgen.gen_number(2);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_moveto(p2, false);	_csgen.gen_number(2);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_moveto(p3_4, false);	_csgen.gen_number(2);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_moveto(p5, false);	_csgen.gen_number(2);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_moveto(p6, false);	_csgen.gen_number(2);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_moveto(p7, false);	_csgen.gen_number(2);	_csgen.gen_command(CS::cCallsubr);	_csgen.gen_number(flex_depth);	_csgen.gen_number(p7.x, 'X');	_csgen.gen_number(p7.y, 'Y');	_csgen.gen_number(0);	_csgen.gen_command(CS::cCallsubr);	double flex_height = fabs(h_ok ? p3_4.y - p0.y : p3_4.x - p0.x);	if (flex_height > _max_flex_height)	    _max_flex_height = flex_height;    } else {	static int messaged = 0;	if (!messaged) {	    _errh->warning("complex flex hint replaced with curves\n(This Type 2 format font contains flex hints that\nType 1 prohibits.)");	    messaged = 1;	}	act_curve(cmd, p0, p1, p2, p3_4);	act_curve(cmd, p3_4, p5, p6, p7);    }}