<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>Stupid question, probably …<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><o:p><FONT size=3 face=Calibri> </FONT></o:p></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>I need some C code to generate Bezier curves from Metafont source code. Ideally, I'd like to have a C/C++ function with the following specifications:<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><o:p><FONT size=3 face=Calibri> </FONT></o:p></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>Input: an array of text strings (the lines in the MetaFont program)<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>Output: an array of Bezier curves representing the centerlines of the "pen" strokes (plus some information about the pen used for each stroke).<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><o:p><FONT size=3 face=Calibri> </FONT></o:p></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>So, internally, this code would parse the MetaFont source, solve little systems of linear equations, and calculate the control points of the Bezier curves.<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><o:p><FONT size=3 face=Calibri> </FONT></o:p></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>Code like this must exist in both MetaFont and MetaPost, but I'm having trouble finding it. <o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><o:p><FONT size=3 face=Calibri> </FONT></o:p></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>I read mplibapi.tex and did some other hunting around, and I learned that I should probably be looking at mplib.c and mplib.h.<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>But I can’t find these at foundry.supelec.fr/gf/project/metapost<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><o:p><FONT size=3 face=Calibri> </FONT></o:p></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>So, my questions are:<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>(1) Are mplib.c and mplib.h in fact the best starting points ?<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>(2) If they are, where can I find them ?<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>(3) If not, what are better options ?<o:p></o:p></FONT></FONT></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><o:p><FONT size=3 face=Calibri> </FONT></o:p></DIV>
<P style="MARGIN: 0in 0in 0pt" class=MsoPlainText><FONT size=3><FONT face=Calibri>Thanks<o:p></o:p></FONT></FONT></DIV></td></tr></table>