[Lazarus] fpVectorial text related question

Leonardo M. Ramé l.rame at griensu.com
Mon Jun 6 15:14:59 CEST 2011


On 2011-06-06 14:26:48 +0200, Felipe Monteiro de Carvalho wrote:
> On Mon, Jun 6, 2011 at 2:14 PM, Alexander Klenin <klenin at gmail.com> 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




More information about the Lazarus mailing list