On 2011-06-06 14:26:48 +0200, Felipe Monteiro de Carvalho wrote: > On Mon, Jun 6, 2011 at 2:14 PM, Alexander Klenin <[email protected]> wrote: > > How about adding a capability to measure text, implemented only for those > > back-ends that support it, like screen and printer? > > The font size value not known before actually starting the rendering, > but the document is created before that. Think about this: You create > a document in Windows and render in Linux. Will it work if you > dependended on measures from fonts from Windows which are not present > in Linux? > > > Yet another alternative would be to introduce text-based distance units, > > similar to "en" and "em" in HTML/SVG. > > That seams interresting, but for which font would that refer to? One > can have multiple fonts in the same drawing, theorically. Or should we > restrict to only one font? >
I think it should be added a SetFont method to set the current font. This font can then be used to AddText and GetMeasuerements. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
