On Mon, Jun 6, 2011 at 13:06, Felipe Monteiro de Carvalho <[email protected]> wrote: > On Mon, Jun 6, 2011 at 1:32 AM, Leonardo M. Ramé <[email protected]> wrote: >> Hi, I would like to know how can I measure text in fpVectorial. I need >> to draw a segment with text in the middle of the segment and I can't >> find any helper function to do that. > > It is impossible to measure text in vectorial graphics because the > rendering font is not known. Note how, for example, AutoCAD and SVG > don't support it. There are two possible work arounds: > > 1> Try to make a clever guess based on the font info and add an extra > safety spacing > 2> Add script capabilities
How about adding a capability to measure text, implemented only for those back-ends that support it, like screen and printer? Yet another alternative would be to introduce text-based distance units, similar to "en" and "em" in HTML/SVG. -- Alexander S. Klenin -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
