On Mon, 17 Jun 2013 07:49:59 +0200
zeljko <zel...@holobit.net> wrote:

> On 06/16/2013 05:03 PM, Vojtěch Čihák wrote:
> > Hello,
> > is there a cross-platform way how to obtain real font size ? Currently all 
> > components has default size 0. But in real numbers it is usually 9 ~ 12 - 
> > depends on system setting. I would like to use smaller font, for example 
> > 2/3 of the default size. Is there something like:
> >
> > Canvas.Font.Size := 2 * GetRealFontSize(Font.Size) div 3;
> > (Of course there are many system setting for fonts. I'm interested in 
> > font-size of the most common components like TLabel).
> 
> There's no such function, but I guess that you can use 
> LCLIntf.GetObject(MyControl.Font.Reference.Handle .....) and read 
> lfHeight from there ?

Problem is that the real font size requires the real font handle.
We need some more flexible property to define the size relative to the
default.

Mattias

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to