Text this: Optimal curve fitting with composite linear and biarc segments/